Consuming API Functions

The process of accessing and using unmanaged code inside the Win32 API is straightforward. First, you must identify the DLL function and the library containing that function. Common Win32 API libraries include the following:

  • GDI32.dll provides Graphics Device Interface (GDI) functions for drawing, printing, and font manipulation.

  • Kernel32.dll provides functions to access low-level OS features like memory management.

  • User32.dll provides functions for menus, timers, and Windows message handling.

Note

If you are unfamiliar with what the API has to offer, we suggest perusing the MSDN SDK documentation or taking a look at the title from which this book derives its name, Visual Basic Programmer's Guide to the Win32 API.

The next ...

Get Visual Basic® Programmer's Guide to the .NET Framework Class Library 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.