PRB: Error C2061 in Visual C++ with Odssamp.dll (160763)
The information in this article applies to:
- Microsoft SQL Server 6.5
- Microsoft Open Database Connectivity 2.5
- Microsoft Open Database Connectivity 3.0
This article was previously published under Q160763 SYMPTOMS
One of the ODBC samples contained in the Programmers Tool Kit (PTK) is the
Odssamp.dll file. This file is created to provide resources for the
Odsgt32.dll file. The Odssamp.dll must be built with Visual C++ using the
project provided in the PTK. When building this project, it is possible for
the following errors to occur:
Compiling resources...
Compiling...
LIBMAIN.C
C:\MSDEV\INCLUDE\prsht.h(246) : error C2061: syntax error : identifier
'NMHDR'
C:\MSDEV\INCLUDE\prsht.h(248) : error C2059: syntax error : '}'
Error executing cl.exe.
ODSSAMP.dll - 2 error(s), 0 warning(s)
CAUSE
The following define statement, listed in the Libmain.c file, is incorrect
for a 32-bit build of the Odssamp.dll file:
#define WINVER 0x030A // prevent Windows 3.1 feature usage
WORKAROUND
To work around this problem, change the #define in the Libmain.c file to
either 0x0400 or to the value of the #define WINVER, listed in the
Windows.h file provided by Visual C++ versions 4.0 through 4.2.
Modification Type: | Major | Last Reviewed: | 10/16/2003 |
---|
Keywords: | kbprb kbprogramming KB160763 |
---|
|