Microsoft Office 2000/Visual Basic Programmer's Guide   

The Windows API and Other Dynamic-Link Libraries

One of the most powerful features of Visual Basic for Applications (VBA) is its extensibility. You can extend your applications by calling functions in the Microsoft Windows application programming interface (API) and other dynamic-link libraries (DLLs). As a VBA programmer, you'll find that most of the functions in the Windows API are available to you, meaning that you not only have control over your solution, but you also have potential control over a significant portion of the operating system. And once you've learned how to use VBA to call a DLL function, you can call functions in almost any DLL, so that you can take advantage of technologies that are typically the domain of C/C++ programmers. This chapter introduces some of the concepts behind calling DLL functions from VBA and includes examples to get you started.

Contents

API Basics

Calling DLL Functions

Wrapping DLL Functions

Using Callback Functions

Where to Go from Here