Article ID: 141811
Article Last Modified on 7/27/2001
#include <windows.h>
#include <sql.h>
#include <sqlext.h>
#include <odbcinst.h>
int WINAPI WinMain(HINSTANCE hinst,HINSTANCE pinst,LPSTR szCmd,int nShow)
{
if (SQLConfigDataSource(NULL,ODBC_ADD_DSN,
"SQL Server","DSN=Oof\0Server=Oof\0\0"))
{
MessageBox(NULL,"SQLConfigDataSource succeeded",
"SQLConfigDataSource",MB_OK);
}
else
{
MessageBox(NULL,"SQLConfigDataSource failed",
"SQLConfigDataSource",MB_OK);
}
return 0;
}
Install the Win32s subsystem from the Win32 SDK on a WFW 3.11 computer.
Run the program on Win32s with the ODBC 2.10a or 2.10b components (these
ship with VC++ 2.1,2.2, and 4.0). It will fail to load with a message that
a DLL could not load or something similar (depends on the version of
Win32s).
Additional query words: 2.10.2401 Thunking DLL
Keywords: kbbug KB141811