14.1. Introducing the Win32 API

An API—application programming interface—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 the most about is the Win32 API, also known as the 32-bit 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 Windows File Open dialog box is an API function called GetOpenFileName found in comdlg32.dll. Similarly, the GetTempPath function in Kernel32.dll returns the name of the folder where temporary files are stored.

The File dialog boxes found in Office applications are customized versions of the Windows dialog boxes. To use these dialog boxes, use the FileDialog object in the Office 12.0 Object Library.

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 ...

Get Access™ 2007 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.