Поделиться через


The Windows API and Other Dynamic-Link Libraries

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

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