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. Another good is this other one. From MS, there 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. Also Jan Karel Pieterse has an specific post on the declarations, that is my first option whenever I deal with 64bits functions.

Other option is this txt file, with a lot of API declarations ready for copy paste, WIn32API

And finally, this PDF file (backup: 59864_AppendixVB6), that will help with those constants lost on the codes that are hard to find in the wild of the net:

Leave a Reply

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