API declarations

One of the most reliable sites about API declarations and use in this site, that deals with 940 functions to be called. They are related to 32-bit (x86) systems; but for 64-bit, we will generally need to change from Long to LongPtr variables, but not on all of them, so from here on, things start to get complex, and there is some search to do.

From MS, here is a SFX file  that covers most API 64-bits declarations and constants. The file extracts to a Win32API_PtrSafe.txt that contains the following:

  • 32-bit (x86) and 64-bit (x64) compatible Declare statements for the Windows API functions that were included in the original Win32API.txt file.
  • Global constant declarations for the constants that the provided Declare statements use.
  • Type declarations for the user-defined types (structures) that the provided Declare statements use.

UtterAccess has published a wiki that tries to list some common APIs in VBA7 syntax.

And finally Jan Karel Pieterse has an specific post on the declarations, that is my first option when I try to declare 64bits functions.

Leave a Reply

Your email address will not be published. Required fields are marked *