Microsoft Office 2000/Visual Basic Programmer's Guide   

Constants and User-Defined Types

In addition to the Declare statement for a DLL function, some functions require that you define constants and types for use with that function. You include constant and user-defined type definitions in the Declarations section of a module, along with the Declare statements for the functions that require them.

How do you know which constants and user-defined types a function requires? Again, you need to look at documentation for the function. The Win32API.txt file contains definitions for the constants and user-defined types that accompany the functions it includes. You can use the API Viewer add-in to locate these constants and user-defined types and copy them to paste into your code. Unfortunately, the constants and user-defined types are not associated in any way with the Declare statements that require them, so you'll still need to check the documentation for the DLL function to determine which constants and types go with which Declare statements.