The information in this article applies to:
SYMPTOMSAttempting to load W3DBLIB.DLL at run-time in a program [by calling LOADLIBRARY()], and then attempting to get the address of a function by calling GetProcAddress(hLibrary, "<function_name>"), will return a NULL pointer. CAUSEWindows assumes that all procedures are defined with the PASCAL calling sequence; therefore, the application always looks for the function name to be in uppercase letters when GetProcAddress() is called. Functions declared with the C calling convention are case sensitive. DB-Library (DB-Lib) functions use the C calling convention and are in all lowercase letters; therefore, Windows cannot load these functions when they are referenced by name. WORKAROUND
Pass the ordinal number of the db-lib functions (assigned in the .DEF file)
to GetProcAddress(). For example:
The ordinal numbers of the DB-Lib functions can be obtained by using the EXEHDR program against W3DBLIB.DLL. STATUSMicrosoft has confirmed this to be a problem in SQL Server version 4.2. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. Additional query words: Programming tools - windows dblib
Keywords : kbprg SSrvDB_Lib SSrvProg |
Last Reviewed: March 11, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |