https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/104715&feed=atom&action=history
Microsoft KB Archive/104715 - Revision history
2024-03-29T08:59:59Z
Revision history for this page on the wiki
MediaWiki 1.39.3
https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/104715&diff=48522&oldid=prev
3155ffGd: importing KB archive
2020-07-18T15:03:47Z
<p>importing KB archive</p>
<p><b>New page</b></p><div>{|<br />
|width="100%"|<br />
== BUG: Handler Function Prototypes Incorrect for C++ ==<br />
|}<br />
<br />
Q104715<br />
<br />
<br />
-----<br />
<br />
The information in this article applies to:<br /><br />
<br />
<br />
* Microsoft SQL Server Programmer's Toolkit, version 4.2<br />
<br />
<br />
-----<br />
<br />
BUG# 9383 (4.2.5)<br /><br />
<br />
<br />
== SYMPTOMS ==<br />
<br />
Attempting to compile a C++ DB-Library application for Microsoft Windows NT generates the following compiler errors when either the Win32 SDK or Visual C++ for Windows NT is used:<br /><br />
<br />
<br />
<blockquote><div class="ERRORMESSAGE"><br />
<br />
error C2664: 'dberrhandle' : cannot convert parameter 1 from<br /><br />
'int (void *,int ,int ,int ,char *,char *)' to<br /><br />
'int (__cdecl *)(void )'<br /><br />
error C2664: 'dbmsghandle' : cannot convert parameter 1 from<br /><br />
'int (void *,long ,int ,int ,char *)' to<br /><br />
'int (__cdecl *)(void )'<br />
<br />
</div></blockquote><br />
<br /><br />
<br />
<br />
== CAUSE ==<br />
<br />
The DBNTWIN32 section of the SQLDB.H header file declares the dberrhandle and dbmsghandle functions improperly for C++.<br />
<br />
<br /><br />
<br />
<br />
== WORKAROUND ==<br />
<br />
In the DBNTWIN32 section of SQLDB.H, change the following line (line 628 in the SQLDB.H file dated 8/24/93) from:<br /><br />
<br /><br />
<br />
<br />
<pre class="CODESAMP"> typedef int (SQLAPI *SQLFARPROC)(); </pre><br />
<br /><br />
to the following:<br /><br />
<br />
<br />
<pre class="CODESAMP"> typedef int (SQLAPI *SQLERRPROC)(DBPROCESS *,INT,INT,INT,CHAR *,CHAR *);<br />
typedef int (SQLAPI *SQLMSGPROC)(DBPROCESS *,DBINT,INT,INT,CHAR *); </pre><br />
<br /><br />
Also in the DBNTWIN32 section of SQLDB.H, change the following lines (lines 633 and 634 in the SQLDB.H file dated 8/24/93) from:<br /><br />
<br />
<br />
<pre class="CODESAMP"> SQLAPI dberrhandle(SQLFARPROC);<br />
SQLAPI dbmsghandle(SQLFARPROC); </pre><br />
<br /><br />
to the following:<br /><br />
<br />
<br />
<pre class="CODESAMP"> SQLAPI dberrhandle(SQLERRPROC);<br />
SQLAPI dbmsghandle(SQLMSGPROC); </pre><br />
<br /><br />
<br />
<br />
== STATUS ==<br />
<br />
Microsoft has confirmed this to be a problem in DB-Library version 4.20.50. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.<br />
<br />
Additional query words: dblib<br />
<br />
Keywords : kbprogramming<br /><br />
Issue type :<br /><br />
Technology : kbSQLServSearch kbAudDeveloper kbSQLServPTK420<br />
<br />
{|<br />
|width="100%"| <br /><br />
Last Reviewed: March 18, 1999<br /><br />
<span>© 2001 Microsoft Corporation. All rights reserved. Terms of Use.</span><br /><br />
|}</div>
3155ffGd