odbc32: Fix some data types for 64-bit.

This commit is contained in:
Alexandre Julliard 2012-11-20 13:22:05 +01:00
parent 92013d7bd2
commit 1ce71ab7d8
2 changed files with 32 additions and 35 deletions

View File

@ -688,7 +688,7 @@ static BOOL ODBC_LoadDMFunctions(void)
SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionHandle)
{
SQLRETURN ret;
TRACE("Env=%lx\n",EnvironmentHandle);
TRACE("Env=%p\n",EnvironmentHandle);
if (!pSQLAllocConnect)
{
@ -698,7 +698,7 @@ SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionH
}
ret = pSQLAllocConnect(EnvironmentHandle, ConnectionHandle);
TRACE("Returns ret=%d, Handle %lx\n",ret, *ConnectionHandle);
TRACE("Returns ret=%d, Handle %p\n",ret, *ConnectionHandle);
return ret;
}
@ -719,7 +719,7 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle)
}
ret = pSQLAllocEnv(EnvironmentHandle);
TRACE("Returns ret=%d, Env=%lx\n",ret, *EnvironmentHandle);
TRACE("Returns ret=%d, Env=%p\n",ret, *EnvironmentHandle);
return ret;
}
@ -730,7 +730,7 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle)
SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle)
{
SQLRETURN ret;
TRACE("(Type=%d, Handle=%lx)\n",HandleType,InputHandle);
TRACE("(Type=%d, Handle=%p)\n",HandleType,InputHandle);
if (!pSQLAllocHandle)
{
@ -751,7 +751,7 @@ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, S
}
ret = pSQLAllocHandle(HandleType, InputHandle, OutputHandle);
TRACE("Returns ret=%d, Handle=%lx\n",ret, *OutputHandle);
TRACE("Returns ret=%d, Handle=%p\n",ret, *OutputHandle);
return ret;
}
@ -763,7 +763,7 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl
{
SQLRETURN ret;
TRACE("(Connection=%lx)\n",ConnectionHandle);
TRACE("(Connection=%p)\n",ConnectionHandle);
if (!pSQLAllocStmt)
{
@ -773,7 +773,7 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl
}
ret = pSQLAllocStmt(ConnectionHandle, StatementHandle);
TRACE ("Returns ret=%d, Handle=%lx\n", ret, *StatementHandle);
TRACE ("Returns ret=%d, Handle=%p\n", ret, *StatementHandle);
return ret;
}
@ -864,7 +864,7 @@ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle)
SQLRETURN WINAPI SQLCloseCursor(SQLHSTMT StatementHandle)
{
SQLRETURN ret;
TRACE("(Handle=%lx)\n",StatementHandle);
TRACE("(Handle=%p)\n",StatementHandle);
if (!pSQLCloseCursor) return SQL_ERROR;
@ -951,7 +951,7 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle,
{
SQLRETURN ret;
TRACE("EnvironmentHandle = %p\n", (LPVOID)EnvironmentHandle);
TRACE("EnvironmentHandle = %p\n", EnvironmentHandle);
if (!pSQLDataSources) return SQL_ERROR;
@ -979,7 +979,7 @@ SQLRETURN WINAPI SQLDataSourcesA(SQLHENV EnvironmentHandle,
{
SQLRETURN ret;
TRACE("EnvironmentHandle = %p\n", (void*)EnvironmentHandle);
TRACE("EnvironmentHandle = %p\n", EnvironmentHandle);
if (!pSQLDataSourcesA) return SQL_ERROR;
@ -1021,7 +1021,7 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle,
SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle)
{
SQLRETURN ret;
TRACE("(Handle=%lx)\n", ConnectionHandle);
TRACE("(Handle=%p)\n", ConnectionHandle);
if (!pSQLDisconnect) return SQL_ERROR;
@ -1114,7 +1114,7 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien
SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle)
{
SQLRETURN ret;
TRACE("(Handle=%lx)\n",ConnectionHandle);
TRACE("(Handle=%p)\n",ConnectionHandle);
if (!pSQLFreeConnect) return SQL_ERROR;
@ -1130,7 +1130,7 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle)
SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle)
{
SQLRETURN ret;
TRACE("(Env=%lx)\n",EnvironmentHandle);
TRACE("(Env=%p)\n",EnvironmentHandle);
if (!pSQLFreeEnv) return SQL_ERROR;
@ -1146,7 +1146,7 @@ SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle)
SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
{
SQLRETURN ret;
TRACE("(Type=%d, Handle=%lx)\n",HandleType,Handle);
TRACE("(Type=%d, Handle=%p)\n",HandleType,Handle);
if (!pSQLFreeHandle) return SQL_ERROR;
@ -1162,7 +1162,7 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option)
{
SQLRETURN ret;
TRACE("(Handle %lx, Option=%d)\n",StatementHandle, Option);
TRACE("(Handle %p, Option=%d)\n",StatementHandle, Option);
if (!pSQLFreeStmt) return SQL_ERROR;
@ -2039,7 +2039,7 @@ SQLRETURN WINAPI SQLColAttributesW(
{
SQLRETURN iResult;
TRACE("hstmt=0x%08lx icol=%d fDescType=%d rgbDesc=%p cbDescMax=%d pcbDesc=%p pfDesc=%p\n",
TRACE("hstmt=%p icol=%d fDescType=%d rgbDesc=%p cbDescMax=%d pcbDesc=%p pfDesc=%p\n",
hstmt, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc);
if (!pSQLColAttributesW) return SQL_ERROR;
@ -2085,7 +2085,7 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle,
SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle,
SQLUSMALLINT ColumnNumber, WCHAR *ColumnName,
SQLSMALLINT BufferLength, SQLSMALLINT *NameLength,
SQLSMALLINT *DataType, SQLUINTEGER *ColumnSize,
SQLSMALLINT *DataType, SQLULEN *ColumnSize,
SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable)
{
SQLRETURN iResult;
@ -2182,7 +2182,7 @@ SQLRETURN WINAPI SQLColAttributeW (SQLHSTMT StatementHandle,
{
SQLRETURN iResult;
TRACE("StatementHandle=0x%08lx ColumnNumber=%d FieldIdentifier=%d CharacterAttribute=%p BufferLength=%d StringLength=%p NumericAttribute=%p\n",
TRACE("StatementHandle=%p ColumnNumber=%d FieldIdentifier=%d CharacterAttribute=%p BufferLength=%d StringLength=%p NumericAttribute=%p\n",
StatementHandle, ColumnNumber, FieldIdentifier,
CharacterAttribute, BufferLength, StringLength, NumericAttribute);
@ -2240,7 +2240,7 @@ SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle,
SQLSMALLINT RecNumber, WCHAR *Name,
SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
SQLSMALLINT *Type, SQLSMALLINT *SubType,
SQLINTEGER *Length, SQLSMALLINT *Precision,
SQLLEN *Length, SQLSMALLINT *Precision,
SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
{
TRACE("\n");
@ -2289,7 +2289,7 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle,
{
SQLRETURN iResult;
TRACE("Attribute = (%02ld) Value = %p BufferLength = (%ld) StringLength = %p\n",
TRACE("Attribute = (%02d) Value = %p BufferLength = (%d) StringLength = %p\n",
Attribute, Value, BufferLength, StringLength);
if (Value == NULL) {
@ -2507,7 +2507,7 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle,
{
SQLRETURN ret;
TRACE("EnvironmentHandle = %p\n", (LPVOID)EnvironmentHandle);
TRACE("EnvironmentHandle = %p\n", EnvironmentHandle);
if (!pSQLDataSourcesW) return SQL_ERROR;
@ -2689,7 +2689,7 @@ SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle,
SQLINTEGER StringLength)
{
SQLRETURN iResult;
TRACE("Attribute = (%02ld) Value = %p StringLength = (%ld)\n",
TRACE("Attribute = (%02d) Value = %p StringLength = (%d)\n",
Attribute, Value, StringLength);
if (!pSQLSetStmtAttrW) return SQL_ERROR;

View File

@ -46,7 +46,7 @@ typedef double SQLDOUBLE;
typedef double SQLFLOAT;
#endif
typedef long SQLINTEGER;
typedef int SQLINTEGER;
#if (ODBCVER >= 0x0300)
typedef unsigned char SQLNUMERIC;
@ -69,27 +69,23 @@ typedef unsigned char SQLVARCHAR;
typedef SQLSMALLINT SQLRETURN;
/* typedef void * SQLHANDLE; */
typedef SQLINTEGER SQLHANDLE;
#if (ODBCVER >= 0x0300)
typedef void *SQLHANDLE;
typedef SQLHANDLE SQLHENV;
typedef SQLHANDLE SQLHDBC;
typedef SQLHANDLE SQLHSTMT;
typedef SQLHANDLE SQLHDESC;
#else
typedef SQLINTEGER SQLHENV;
typedef SQLINTEGER SQLHDBC;
typedef SQLINTEGER SQLHSTMT;
typedef void *SQLHENV;
typedef void *SQLHDBC;
typedef void *SQLHSTMT;
#endif
typedef signed char SCHAR;
typedef SCHAR SQLSCHAR;
typedef long int SDWORD;
typedef int SDWORD;
typedef signed short int SWORD;
typedef unsigned long int UDWORD;
typedef unsigned int UDWORD;
typedef unsigned short int UWORD;
typedef UDWORD SQLUINTEGER;
typedef signed long SLONG;
@ -207,7 +203,8 @@ typedef struct tagSQL_INTERVAL_STRUCT
#endif
#if (ODBCVER >= 0x0300)
#define ODBCINT64 long
#define ODBCINT64 __int64
#define UODBCINT64 unsigned __int64
#ifdef ODBCINT64
typedef ODBCINT64 SQLBIGINT;
typedef unsigned ODBCINT64 SQLUBIGINT;
@ -240,7 +237,7 @@ typedef struct tagSQLGUID
#endif
typedef unsigned long int BOOKMARK;
typedef SQLULEN BOOKMARK;
#define SQL_WCHAR (-8)
#define SQL_C_WCHAR SQL_WCHAR