[PATCH] Made ODBC function signatures 64-bit compliant

Andreas Damm andreas.damm at insightsoftware.com
Tue Feb 14 12:55:01 CST 2017


From: Andreas Damm <andreas at insightsoftware.com>

When using ODBC in a 64-bit environment I encountered a bug when SQLBindParameter is called where the driver manager (unixODBC) thinks that the 'BufferLength' parameter is less than 0, even though a value of 4 has been passed. The program I am trying to run is only available in a 64-bit version. Not being able to use MDAC (there doesn't appear to be a 64-bit version for download), the builtin odbc32.dll proxy to unixODBC is being used.

It appears that some of the signatures of the ODBC functions are incorrect when used in 64-bit mode chiefly when any length related argument is passed. Only the first 4 bytes are being forwarded to unixODBC with the remaining 4 bytes (length types in 64-bit are 8 bytes long) being padding and not having a defined value (something with the MSB set 1 making the whole number negative in my case).

Signature changes for 64-bit ODBC are limited to the SQLLEN, SQLULEN and SQLSETPOSIROW argument types. The ODBC header files and proxyodbc.c have been updated accordingly by this patch.

Andreas Damm (1):
  Made ODBC function signatures 64-bit compliant

 dlls/odbc32/proxyodbc.c |  108 +++++++++++++++++++++++-----------------------
 include/sql.h           |   36 ++++++++--------
 include/sqlext.h        |   22 +++++-----
 3 files changed, 83 insertions(+), 83 deletions(-)

Disclaimer: This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this email. Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system. Our company accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. Hubble® is a brand name of the insightsoftware.com Group. insightsoftware.com is a registered trademark of insightsoftware.com Limited, registered in England No. 2860790 at 4th Floor, International House, 7 High Street, Ealing, London. W5 5DB. United Kingdom. VAT Number: GB 766 8160 95. Hubble is a registered trademark of insightsoftware.com International Unlimited, registered in Isle of Man No. 005199V at 8 St George's Street, Douglas. Isle of Man. IM1 1AH. VAT Number: IE 9823 609 M



More information about the wine-patches mailing list