13.1. Introducing the Win32 API

API stands for application programming interface. It is simply a group of standard functions that are packaged together and made available to application programmers.

There are quite a few APIs, but the one that you've probably heard most about is the Windows API. The Windows API consists of many DLLs that make up the Windows operating system and ensure that every application that runs under Windows behaves in a consistent manner.

What this actually means is that standard Windows operations, such as saving files, opening forms, managing dialog boxes, and so on, are all handled by the Windows APIs. For example, the standard File Open dialog box is an API function called GetOpenFileName found in comdlg32.dll. Similarly, the GetTempPath function in Kernl32.dll returns the name of the folder where temporary files are stored.

All Windows-based applications interact with the Windows APIs in some way, whether they are opening a file, displaying time, putting text on the screen, or managing computer memory while you play Flight Simulator.

When you program in Microsoft Access, you use the built-in VBA functions, which you could loosely refer to as an API. Similarly, when you use the Access Add-in Manager or References dialog box to link to an external DLL, OCX, MDB, and so on, you are linking to something that is essentially an API.

There's no need to feel intimidated by the API, despite the fact that it has the reputation of being highly complex. Because ...

Get Access 2003 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.