Calling Procedures in the Windows Application Programming Interface
If a database created in previous versions of Microsoft Access called procedures in the Microsoft Windows application programming interface (API), you will need to make some changes in your code when you convert a version 2.0 or earlier database to Microsoft Access 2000.
The Windows API consists of a set of dynamic-link libraries (DLLs) containing system-related procedures that include functions, messages, data structures, data types, and statements you can use in creating applications that run under Windows 95 or the Windows NT platform. In order to call these procedures from Visual Basic, you must first declare them by using a Declare statement. You can then call them as you would any other procedure.
In versions 1.x and 2.0 of Microsoft Access were 16-bit applications and ran on 16-bit versions of Windows. Microsoft Access 2000 is a 32-bit application and runs only under Windows 95 and the Windows NT platform. If your existing Access Basic code made calls to a 16-bit Windows API, you will need to modify these calls when you convert your database to Microsoft Access 2000. The following list provides some tips for converting your code.
16-bit Windows DLL | 32-bit Windows DLL |
---|---|
User.dll | User32.dll |
Kernel.dll | Kernel32.dll |
GDI.dll | GDI32.dll |
For more information on using 32-bit Windows API procedures and on porting your existing database applications to 32-bit Microsoft Access 2000, consult the following resources:
Calling Code in Other DLLs
If your database application calls procedures in other DLLs, you must create or obtain 32-bit versions of those DLLs and make any necessary modifications to your code when you convert your database to Microsoft Access 2000.
If you can't obtain a 32-bit version of a DLL, then you'll need an intermediary DLL that can convert 32-bit calls to 16-bit calls. For more information, see the preceding resources list.