What Is the Windows API

With all the wonderful things you can do in Excel VBA, there are some things that are out of its reach or just difficult to do—such as finding out what the user's screen resolution setting is. This is where the Windows Application Programming Interface, or API, can help.

If you look in the folder \Winnt\System32 (NT systems), you'll see a lot of files with the extension .dll. These files are Dynamic Link Libraries-, they contain various functions and procedures that other programs, including VBA, can access. They give the user access to functionality used by the Windows operating system and many other programs. Keep in mind that Windows API declarations are accessible only on computers running the Microsoft Windows operating system.

This chapter doesn't teach you how to write API declarations, but it does teach you the basics of interpreting and using them. Several useful examples have also been included and you will be shown how to find more.

What Is the Windows API? 453

Understanding an API Declaration 453

Using an API Declaration 454

API Examples 455

Finding More API Declarations 466

Next Steps 466

0 0

Post a comment