From: Hans Leidekker hans@codeweavers.com
--- dlls/odbc32/proxyodbc.c | 38 +++++--------------------------------- dlls/odbc32/unixlib.c | 26 -------------------------- dlls/odbc32/unixlib.h | 4 ---- 3 files changed, 5 insertions(+), 63 deletions(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 679f3d7380e..00a7e1d7806 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -616,26 +616,8 @@ SQLRETURN WINAPI SQLDataSourcesA(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, SQLCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2) { - struct SQLDataSourcesA_params params = { EnvironmentHandle, Direction, ServerName, BufferLength1, - NameLength1, Description, BufferLength2, NameLength2 }; - SQLRETURN ret; - - TRACE("(EnvironmentHandle %p, Direction %d, ServerName %p, BufferLength1 %d, NameLength1 %p, Description %p," - " BufferLength2 %d, NameLength2 %p)\n", EnvironmentHandle, Direction, ServerName, BufferLength1, - NameLength1, Description, BufferLength2, NameLength2); - - ret = ODBC_CALL( SQLDataSourcesA, ¶ms ); - if (TRACE_ON(odbc)) - { - if (ServerName && NameLength1 && *NameLength1 > 0) - TRACE(" DataSource %s", debugstr_an((const char *)ServerName, *NameLength1)); - if (Description && NameLength2 && *NameLength2 > 0) - TRACE(" Description %s", debugstr_an((const char *)Description, *NameLength2)); - TRACE("\n"); - } - - TRACE("Returning %d\n", ret); - return ret; + return SQLDataSources( EnvironmentHandle, Direction, ServerName, BufferLength1, NameLength1, Description, + BufferLength2, NameLength2 ); }
/************************************************************************* @@ -2612,23 +2594,13 @@ SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, * SQLGetDiagRecA [ODBC32.236] */ SQLRETURN WINAPI SQLGetDiagRecA(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, - SQLCHAR *Sqlstate, SQLINTEGER *NativeError, SQLCHAR *MessageText, + SQLCHAR *SqlState, SQLINTEGER *NativeError, SQLCHAR *MessageText, SQLSMALLINT BufferLength, SQLSMALLINT *TextLength) { - struct SQLGetDiagRecA_params params = { HandleType, Handle, RecNumber, Sqlstate, NativeError, - MessageText, BufferLength, TextLength }; - SQLRETURN ret; - - TRACE("(HandleType %d, Handle %p, RecNumber %d, Sqlstate %p, NativeError %p, MessageText %p, BufferLength %d," - " TextLength %p)\n", HandleType, Handle, RecNumber, Sqlstate, NativeError, MessageText, BufferLength, - TextLength); - - ret = ODBC_CALL( SQLGetDiagRecA, ¶ms ); - TRACE("Returning %d\n", ret); - return ret; + return SQLGetDiagRec( HandleType, Handle, RecNumber, SqlState, NativeError, MessageText, BufferLength, + TextLength ); }
- /*********************************************************************** * DllMain [Internal] Initializes the internal 'ODBC32.DLL'. */ diff --git a/dlls/odbc32/unixlib.c b/dlls/odbc32/unixlib.c index 2883a5fb56a..c75f86e1a41 100644 --- a/dlls/odbc32/unixlib.c +++ b/dlls/odbc32/unixlib.c @@ -77,7 +77,6 @@ static SQLRETURN (*pSQLConnect)(SQLHDBC,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLIN static SQLRETURN (*pSQLConnectW)(SQLHDBC,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); static SQLRETURN (*pSQLCopyDesc)(SQLHDESC,SQLHDESC); static SQLRETURN (*pSQLDataSources)(SQLHENV,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLDataSourcesA)(SQLHENV,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); static SQLRETURN (*pSQLDataSourcesW)(SQLHENV,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); static SQLRETURN (*pSQLDescribeCol)(SQLHSTMT,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLULEN*,SQLSMALLINT*,SQLSMALLINT*); static SQLRETURN (*pSQLDescribeColW)(SQLHSTMT,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLULEN*,SQLSMALLINT*,SQLSMALLINT*); @@ -116,7 +115,6 @@ static SQLRETURN (*pSQLGetDescRecW)(SQLHDESC,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,S static SQLRETURN (*pSQLGetDiagField)(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); static SQLRETURN (*pSQLGetDiagFieldW)(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); static SQLRETURN (*pSQLGetDiagRec)(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLCHAR*,SQLINTEGER*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLGetDiagRecA)(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLCHAR*,SQLINTEGER*, SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); static SQLRETURN (*pSQLGetDiagRecW)(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLWCHAR*,SQLINTEGER*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); static SQLRETURN (*pSQLGetEnvAttr)(SQLHENV,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); static SQLRETURN (*pSQLGetFunctions)(SQLHDBC,SQLUSMALLINT,SQLUSMALLINT*); @@ -411,16 +409,6 @@ static NTSTATUS wrap_SQLDataSources( void *args ) params->BufferLength2, params->NameLength2); }
-static NTSTATUS wrap_SQLDataSourcesA( void *args ) -{ - struct SQLDataSourcesA_params *params = args; - - if (!pSQLDataSourcesA) return SQL_ERROR; - return pSQLDataSourcesA(params->EnvironmentHandle, params->Direction, params->ServerName, - params->BufferLength1, params->NameLength1, params->Description, - params->BufferLength2, params->NameLength2); -} - static NTSTATUS wrap_SQLDataSourcesW( void *args ) { struct SQLDataSourcesW_params *params = args; @@ -768,16 +756,6 @@ static NTSTATUS wrap_SQLGetDiagRec( void *args ) params->TextLength); }
-static NTSTATUS wrap_SQLGetDiagRecA( void *args ) -{ - struct SQLGetDiagRecA_params *params = args; - - if (!pSQLGetDiagRecA) return SQL_ERROR; - return pSQLGetDiagRecA(params->HandleType, params->Handle, params->RecNumber, params->Sqlstate, - params->NativeError, params->MessageText, params->BufferLength, - params->TextLength); -} - static NTSTATUS wrap_SQLGetDiagRecW( void *args ) { struct SQLGetDiagRecW_params *params = args; @@ -1269,7 +1247,6 @@ const unixlib_entry_t __wine_unix_call_funcs[NB_ODBC_FUNCS] = wrap_SQLConnectW, wrap_SQLCopyDesc, wrap_SQLDataSources, - wrap_SQLDataSourcesA, wrap_SQLDataSourcesW, wrap_SQLDescribeCol, wrap_SQLDescribeColW, @@ -1308,7 +1285,6 @@ const unixlib_entry_t __wine_unix_call_funcs[NB_ODBC_FUNCS] = wrap_SQLGetDiagField, wrap_SQLGetDiagFieldW, wrap_SQLGetDiagRec, - wrap_SQLGetDiagRecA, wrap_SQLGetDiagRecW, wrap_SQLGetEnvAttr, wrap_SQLGetFunctions, @@ -1404,7 +1380,6 @@ static NTSTATUS load_odbc(void) LOAD_FUNC(SQLConnectW); LOAD_FUNC(SQLCopyDesc); LOAD_FUNC(SQLDataSources); - LOAD_FUNC(SQLDataSourcesA); LOAD_FUNC(SQLDataSourcesW); LOAD_FUNC(SQLDescribeCol); LOAD_FUNC(SQLDescribeColW); @@ -1443,7 +1418,6 @@ static NTSTATUS load_odbc(void) LOAD_FUNC(SQLGetDiagField); LOAD_FUNC(SQLGetDiagFieldW); LOAD_FUNC(SQLGetDiagRec); - LOAD_FUNC(SQLGetDiagRecA); LOAD_FUNC(SQLGetDiagRecW); LOAD_FUNC(SQLGetEnvAttr); LOAD_FUNC(SQLGetFunctions); diff --git a/dlls/odbc32/unixlib.h b/dlls/odbc32/unixlib.h index 13ce8d0883b..f1a6a17634e 100644 --- a/dlls/odbc32/unixlib.h +++ b/dlls/odbc32/unixlib.h @@ -64,7 +64,6 @@ enum sql_funcs unix_SQLConnectW, unix_SQLCopyDesc, unix_SQLDataSources, - unix_SQLDataSourcesA, unix_SQLDataSourcesW, unix_SQLDescribeCol, unix_SQLDescribeColW, @@ -103,7 +102,6 @@ enum sql_funcs unix_SQLGetDiagField, unix_SQLGetDiagFieldW, unix_SQLGetDiagRec, - unix_SQLGetDiagRecA, unix_SQLGetDiagRecW, unix_SQLGetEnvAttr, unix_SQLGetFunctions, @@ -184,7 +182,6 @@ struct SQLConnect_params { SQLHDBC ConnectionHandle; SQLCHAR *ServerName; SQLSMA struct SQLConnectW_params { SQLHDBC ConnectionHandle; WCHAR *ServerName; SQLSMALLINT NameLength1; WCHAR *UserName; SQLSMALLINT NameLength2; WCHAR *Authentication; SQLSMALLINT NameLength3; }; struct SQLCopyDesc_params { SQLHDESC SourceDescHandle; SQLHDESC TargetDescHandle; }; struct SQLDataSources_params { SQLHENV EnvironmentHandle; SQLUSMALLINT Direction; SQLCHAR *ServerName; SQLSMALLINT BufferLength1; SQLSMALLINT *NameLength1; SQLCHAR *Description; SQLSMALLINT BufferLength2; SQLSMALLINT *NameLength2; }; -struct SQLDataSourcesA_params { SQLHENV EnvironmentHandle; SQLUSMALLINT Direction; SQLCHAR *ServerName; SQLSMALLINT BufferLength1; SQLSMALLINT *NameLength1; SQLCHAR *Description; SQLSMALLINT BufferLength2; SQLSMALLINT *NameLength2; }; struct SQLDataSourcesW_params { SQLHENV EnvironmentHandle; SQLUSMALLINT Direction; WCHAR *ServerName; SQLSMALLINT BufferLength1; SQLSMALLINT *NameLength1; WCHAR *Description; SQLSMALLINT BufferLength2; SQLSMALLINT *NameLength2; }; struct SQLDescribeCol_params { SQLHSTMT StatementHandle; SQLUSMALLINT ColumnNumber; SQLCHAR *ColumnName; SQLSMALLINT BufferLength; SQLSMALLINT *NameLength; SQLSMALLINT *DataType; SQLULEN *ColumnSize; SQLSMALLINT *DecimalDigits; SQLSMALLINT *Nullable; }; struct SQLDescribeColW_params { SQLHSTMT StatementHandle; SQLUSMALLINT ColumnNumber; WCHAR *ColumnName; SQLSMALLINT BufferLength; SQLSMALLINT *NameLength; SQLSMALLINT *DataType; SQLULEN *ColumnSize; SQLSMALLINT *DecimalDigits; SQLSMALLINT *Nullable; }; @@ -223,7 +220,6 @@ struct SQLGetDescRecW_params { SQLHDESC DescriptorHandle; SQLSMALLINT RecNumber; struct SQLGetDiagField_params { SQLSMALLINT HandleType; SQLHANDLE Handle; SQLSMALLINT RecNumber; SQLSMALLINT DiagIdentifier; SQLPOINTER DiagInfo; SQLSMALLINT BufferLength; SQLSMALLINT *StringLength; }; struct SQLGetDiagFieldW_params { SQLSMALLINT HandleType; SQLHANDLE Handle; SQLSMALLINT RecNumber; SQLSMALLINT DiagIdentifier; SQLPOINTER DiagInfo; SQLSMALLINT BufferLength; SQLSMALLINT *StringLength; }; struct SQLGetDiagRec_params { SQLSMALLINT HandleType; SQLHANDLE Handle; SQLSMALLINT RecNumber; SQLCHAR *Sqlstate; SQLINTEGER *NativeError; SQLCHAR *MessageText; SQLSMALLINT BufferLength; SQLSMALLINT *TextLength; }; -struct SQLGetDiagRecA_params { SQLSMALLINT HandleType; SQLHANDLE Handle; SQLSMALLINT RecNumber; SQLCHAR *Sqlstate; SQLINTEGER *NativeError; SQLCHAR *MessageText; SQLSMALLINT BufferLength; SQLSMALLINT *TextLength; }; struct SQLGetDiagRecW_params { SQLSMALLINT HandleType; SQLHANDLE Handle; SQLSMALLINT RecNumber; WCHAR *Sqlstate; SQLINTEGER *NativeError; WCHAR *MessageText; SQLSMALLINT BufferLength; SQLSMALLINT *TextLength; }; struct SQLGetEnvAttr_params { SQLHENV EnvironmentHandle; SQLINTEGER Attribute; SQLPOINTER Value; SQLINTEGER BufferLength; SQLINTEGER *StringLength; }; struct SQLGetFunctions_params { SQLHDBC ConnectionHandle; SQLUSMALLINT FunctionId; SQLUSMALLINT *Supported; };
From: Hans Leidekker hans@codeweavers.com
--- dlls/odbc32/proxyodbc.c | 1464 +++++++++++++++++++++++++++------------ dlls/odbc32/unixlib.c | 472 +++++++------ dlls/odbc32/unixlib.h | 1229 ++++++++++++++++++++++++++++---- 3 files changed, 2379 insertions(+), 786 deletions(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 00a7e1d7806..a3195afac5a 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -336,18 +336,30 @@ static void ODBC_ReplicateToRegistry (void) } }
+#define SUCCESS(ret) (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) + /************************************************************************* * SQLAllocConnect [ODBC32.001] */ SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionHandle) { - struct SQLAllocConnect_params params = { EnvironmentHandle, ConnectionHandle }; + struct SQLAllocConnect_params params; + struct handle *con, *env = EnvironmentHandle; SQLRETURN ret;
TRACE("(EnvironmentHandle %p, ConnectionHandle %p)\n", EnvironmentHandle, ConnectionHandle);
- *ConnectionHandle = SQL_NULL_HDBC; - ret = ODBC_CALL( SQLAllocConnect, ¶ms ); + *ConnectionHandle = 0; + if (!(con = calloc( 1, sizeof(*con) ))) return SQL_ERROR; + + params.EnvironmentHandle = env->unix_handle; + if (SUCCESS((ret = ODBC_CALL( SQLAllocConnect, ¶ms )))) + { + con->unix_handle = params.ConnectionHandle; + *ConnectionHandle = con; + } + else free( con ); + TRACE("Returning %d, ConnectionHandle %p\n", ret, *ConnectionHandle); return ret; } @@ -357,13 +369,22 @@ SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionH */ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle) { - struct SQLAllocEnv_params params = { EnvironmentHandle }; + struct SQLAllocEnv_params params; + struct handle *env; SQLRETURN ret;
TRACE("(EnvironmentHandle %p)\n", EnvironmentHandle);
- *EnvironmentHandle = SQL_NULL_HENV; - ret = ODBC_CALL( SQLAllocEnv, ¶ms ); + *EnvironmentHandle = 0; + if (!(env = calloc( 1, sizeof(*env) ))) return SQL_ERROR; + + if (SUCCESS((ret = ODBC_CALL( SQLAllocEnv, ¶ms )))) + { + env->unix_handle = params.EnvironmentHandle; + *EnvironmentHandle = env; + } + else free( env ); + TRACE("Returning %d, EnvironmentHandle %p\n", ret, *EnvironmentHandle); return ret; } @@ -373,14 +394,25 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle) */ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle) { - struct SQLAllocHandle_params params = { HandleType, InputHandle, OutputHandle }; + struct SQLAllocHandle_params params; + struct handle *output, *input = InputHandle; SQLRETURN ret;
TRACE("(HandleType %d, InputHandle %p, OutputHandle %p)\n", HandleType, InputHandle, OutputHandle);
*OutputHandle = 0; - ret = ODBC_CALL( SQLAllocHandle, ¶ms ); - TRACE("Returning %d, Handle %p\n", ret, *OutputHandle); + if (!(output = calloc( 1, sizeof(*output) ))) return SQL_ERROR; + + params.HandleType = HandleType; + params.InputHandle = input ? input->unix_handle : 0; + if (SUCCESS((ret = ODBC_CALL( SQLAllocHandle, ¶ms )))) + { + output->unix_handle = params.OutputHandle; + *OutputHandle = output; + } + else free( output ); + + TRACE("Returning %d, OutputHandle %p\n", ret, *OutputHandle); return ret; }
@@ -389,13 +421,23 @@ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, S */ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandle) { - struct SQLAllocStmt_params params = { ConnectionHandle, StatementHandle }; + struct SQLAllocStmt_params params; + struct handle *stmt, *con = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, StatementHandle %p)\n", ConnectionHandle, StatementHandle);
- *StatementHandle = SQL_NULL_HSTMT; - ret = ODBC_CALL( SQLAllocStmt, ¶ms ); + *StatementHandle = 0; + if (!(stmt = calloc( 1, sizeof(*stmt) ))) return SQL_ERROR; + + params.ConnectionHandle = con->unix_handle; + if (SUCCESS((ret = ODBC_CALL( SQLAllocStmt, ¶ms )))) + { + stmt->unix_handle = params.StatementHandle; + *StatementHandle = stmt; + } + else free( stmt ); + TRACE ("Returning %d, StatementHandle %p\n", ret, *StatementHandle); return ret; } @@ -405,13 +447,24 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl */ SQLRETURN WINAPI SQLAllocHandleStd(SQLSMALLINT HandleType, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle) { - struct SQLAllocHandleStd_params params = { HandleType, InputHandle, OutputHandle }; + struct SQLAllocHandleStd_params params; + struct handle *output, *input = InputHandle; SQLRETURN ret;
TRACE("(HandleType %d, InputHandle %p, OutputHandle %p)\n", HandleType, InputHandle, OutputHandle);
*OutputHandle = 0; - ret = ODBC_CALL( SQLAllocHandleStd, ¶ms ); + if (!(output = calloc( 1, sizeof(*output) ))) return SQL_ERROR; + + params.HandleType = HandleType; + params.InputHandle = input ? input->unix_handle : 0; + if (SUCCESS((ret = ODBC_CALL( SQLAllocHandleStd, ¶ms )))) + { + output->unix_handle = params.OutputHandle; + *OutputHandle = output; + } + else free( output ); + TRACE ("Returning %d, OutputHandle %p\n", ret, *OutputHandle); return ret; } @@ -425,20 +478,42 @@ static const char *debugstr_sqllen( SQLLEN len ) #endif }
+static BOOL resize_binding( struct param_binding *binding, UINT32 count ) +{ + struct param *tmp; + UINT32 new_count = max( binding->count, count ); + + if (!(tmp = realloc( binding->param, new_count * sizeof(*tmp) ))) return FALSE; + memset( tmp + binding->count, 0, (new_count - binding->count) * sizeof(*tmp) ); + binding->param = tmp; + binding->count = new_count; + return TRUE; +} + /************************************************************************* * SQLBindCol [ODBC32.004] */ SQLRETURN WINAPI SQLBindCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLLEN BufferLength, SQLLEN *StrLen_or_Ind) { - struct SQLBindCol_params params = { StatementHandle, ColumnNumber, TargetType, TargetValue, - BufferLength, StrLen_or_Ind }; + struct SQLBindCol_params params = { 0, ColumnNumber, TargetType, TargetValue, BufferLength }; + struct handle *handle = StatementHandle; + UINT i = ColumnNumber - 1; SQLRETURN ret;
TRACE("(StatementHandle %p, ColumnNumber %d, TargetType %d, TargetValue %p, BufferLength %s, StrLen_or_Ind %p)\n", StatementHandle, ColumnNumber, TargetType, TargetValue, debugstr_sqllen(BufferLength), StrLen_or_Ind);
- ret = ODBC_CALL( SQLBindCol, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + if (!ColumnNumber) + { + FIXME( "column 0 not handled\n" ); + return SQL_ERROR; + } + if (!resize_binding( &handle->bind_col, ColumnNumber )) return SQL_ERROR; + params.StatementHandle = handle->unix_handle; + params.StrLen_or_Ind = &handle->bind_col.param[i].len; + if (SUCCESS(( ret = ODBC_CALL( SQLBindCol, ¶ms )))) handle->bind_col.param[i].ptr = StrLen_or_Ind; TRACE ("Returning %d\n", ret); return ret; } @@ -459,15 +534,27 @@ SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNu SQLSMALLINT ParameterType, SQLULEN LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLLEN *StrLen_or_Ind) { - struct SQLBindParam_params params = { StatementHandle, ParameterNumber, ValueType, ParameterType, - LengthPrecision, ParameterScale, ParameterValue, StrLen_or_Ind }; + struct SQLBindParam_params params = { 0, ParameterNumber, ValueType, ParameterType, LengthPrecision, + ParameterScale, ParameterValue }; + struct handle *handle = StatementHandle; + UINT i = ParameterNumber - 1; SQLRETURN ret;
TRACE("(StatementHandle %p, ParameterNumber %d, ValueType %d, ParameterType %d, LengthPrecision %s," " ParameterScale %d, ParameterValue %p, StrLen_or_Ind %p)\n", StatementHandle, ParameterNumber, ValueType, ParameterType, debugstr_sqlulen(LengthPrecision), ParameterScale, ParameterValue, StrLen_or_Ind);
- ret = ODBC_CALL( SQLBindParam, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + if (!ParameterNumber) + { + FIXME( "parameter 0 not handled\n" ); + return SQL_ERROR; + } + if (!resize_binding( &handle->bind_param, ParameterNumber )) return SQL_ERROR; + + params.StatementHandle = handle->unix_handle; + params.StrLen_or_Ind = &handle->bind_param.param[i].len; + if (SUCCESS(( ret = ODBC_CALL( SQLBindParam, ¶ms )))) handle->bind_param.param[i].ptr = StrLen_or_Ind; TRACE ("Returning %d\n", ret); return ret; } @@ -477,11 +564,15 @@ SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNu */ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle) { - struct SQLCancel_params params = { StatementHandle }; + struct SQLCancel_params params; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p)\n", StatementHandle);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLCancel, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -492,11 +583,15 @@ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle) */ SQLRETURN WINAPI SQLCloseCursor(SQLHSTMT StatementHandle) { - struct SQLCloseCursor_params params = { StatementHandle }; + struct SQLCloseCursor_params params; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p)\n", StatementHandle);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLCloseCursor, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -505,20 +600,25 @@ SQLRETURN WINAPI SQLCloseCursor(SQLHSTMT StatementHandle) /************************************************************************* * SQLColAttribute [ODBC32.027] */ -SQLRETURN WINAPI SQLColAttribute(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, - SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttribute, - SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, +SQLRETURN WINAPI SQLColAttribute(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, + SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLLEN *NumericAttribute) { - struct SQLColAttribute_params params = { StatementHandle, ColumnNumber, FieldIdentifier, - CharacterAttribute, BufferLength, StringLength, NumericAttribute }; + struct SQLColAttribute_params params = { 0, ColumnNumber, FieldIdentifier, CharacterAttribute, BufferLength, + StringLength }; + struct handle *handle = StatementHandle; + INT64 num_attr = 0; SQLRETURN ret;
TRACE("(StatementHandle %p, ColumnNumber %d, FieldIdentifier %d, CharacterAttribute %p, BufferLength %d," " StringLength %p, NumericAttribute %p)\n", StatementHandle, ColumnNumber, FieldIdentifier, CharacterAttribute, BufferLength, StringLength, NumericAttribute);
- ret = ODBC_CALL( SQLColAttribute, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; + params.NumericAttribute = &num_attr; + if (SUCCESS(( ret = ODBC_CALL( SQLColAttribute, ¶ms )))) *NumericAttribute = num_attr; TRACE("Returning %d\n", ret); return ret; } @@ -530,8 +630,9 @@ SQLRETURN WINAPI SQLColumns(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLS SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *ColumnName, SQLSMALLINT NameLength4) { - struct SQLColumns_params params = { StatementHandle, CatalogName, NameLength1, SchemaName, NameLength2, - TableName, NameLength3, ColumnName, NameLength4 }; + struct SQLColumns_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, TableName, + NameLength3, ColumnName, NameLength4 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s," @@ -541,6 +642,9 @@ SQLRETURN WINAPI SQLColumns(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLS debugstr_an((const char *)TableName, NameLength3), NameLength3, debugstr_an((const char *)ColumnName, NameLength4), NameLength4);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLColumns, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -553,8 +657,8 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM SQLCHAR *UserName, SQLSMALLINT NameLength2, SQLCHAR *Authentication, SQLSMALLINT NameLength3) { - struct SQLConnect_params params = { ConnectionHandle, ServerName, NameLength1, UserName, NameLength2, - Authentication, NameLength3 }; + struct SQLConnect_params params = { 0, ServerName, NameLength1, UserName, NameLength2, Authentication, NameLength3 }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, ServerName %s, NameLength1 %d, UserName %s, NameLength2 %d, Authentication %s," @@ -563,6 +667,9 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM debugstr_an((const char *)UserName, NameLength2), NameLength2, debugstr_an((const char *)Authentication, NameLength3), NameLength3);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLConnect, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -573,11 +680,16 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM */ SQLRETURN WINAPI SQLCopyDesc(SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle) { - struct SQLCopyDesc_params params = { SourceDescHandle, TargetDescHandle }; + struct SQLCopyDesc_params params; + struct handle *source = SourceDescHandle, *target = TargetDescHandle; SQLRETURN ret;
TRACE("(SourceDescHandle %p, TargetDescHandle %p)\n", SourceDescHandle, TargetDescHandle);
+ if (!source || !target) return SQL_INVALID_HANDLE; + + params.SourceDescHandle = source->unix_handle; + params.TargetDescHandle = target->unix_handle; ret = ODBC_CALL( SQLCopyDesc, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -590,16 +702,19 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle, SQLUSMALLINT Directio SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, SQLCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2) { - struct SQLDataSources_params params = { EnvironmentHandle, Direction, ServerName, BufferLength1, - NameLength1, Description, BufferLength2, NameLength2 }; + struct SQLDataSources_params params = { 0, Direction, ServerName, BufferLength1, NameLength1, Description, + BufferLength2, NameLength2 }; + struct handle *handle = EnvironmentHandle; SQLRETURN ret;
TRACE("(EnvironmentHandle %p, Direction %d, ServerName %p, BufferLength1 %d, NameLength1 %p, Description %p," " BufferLength2 %d, NameLength2 %p)\n", EnvironmentHandle, Direction, ServerName, BufferLength1, NameLength1, Description, BufferLength2, NameLength2);
- ret = ODBC_CALL( SQLDataSources, ¶ms ); - if (ret >= 0 && TRACE_ON(odbc)) + if (!handle) return SQL_INVALID_HANDLE; + + params.EnvironmentHandle = handle->unix_handle; + if (SUCCESS((ret = ODBC_CALL( SQLDataSources, ¶ms ))) && TRACE_ON(odbc)) { if (ServerName && NameLength1 && *NameLength1 > 0) TRACE(" DataSource %s", debugstr_an((const char *)ServerName, *NameLength1)); @@ -627,8 +742,10 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, SQLSMALLINT *DataType, SQLULEN *ColumnSize, SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable) { - struct SQLDescribeCol_params params = { StatementHandle, ColumnNumber, ColumnName, BufferLength, - NameLength, DataType, ColumnSize, DecimalDigits, Nullable }; + struct SQLDescribeCol_params params = { 0, ColumnNumber, ColumnName, BufferLength, NameLength, DataType, + NULL, DecimalDigits, Nullable }; + struct handle *handle = StatementHandle; + UINT64 size; SQLSMALLINT dummy; SQLRETURN ret;
@@ -636,14 +753,20 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum " ColumnSize %p, DecimalDigits %p, Nullable %p)\n", StatementHandle, ColumnNumber, ColumnName, BufferLength, NameLength, DataType, ColumnSize, DecimalDigits, Nullable);
- if (!params.NameLength) params.NameLength = &dummy; /* workaround for drivers that don't accept NULL NameLength */ + if (!handle) return SQL_INVALID_HANDLE;
- ret = ODBC_CALL( SQLDescribeCol, ¶ms ); - if (ret >= 0) + params.StatementHandle = handle->unix_handle; + if (!params.NameLength) params.NameLength = &dummy; /* workaround for drivers that don't accept NULL NameLength */ + params.ColumnSize = &size; + if (SUCCESS((ret = ODBC_CALL( SQLDescribeCol, ¶ms )))) { if (ColumnName && NameLength) TRACE(" ColumnName %s\n", debugstr_an((const char *)ColumnName, *NameLength)); if (DataType) TRACE(" DataType %d\n", *DataType); - if (ColumnSize) TRACE(" ColumnSize %s\n", debugstr_sqlulen(*ColumnSize)); + if (ColumnSize) + { + *ColumnSize = size; + TRACE(" ColumnSize %s\n", debugstr_sqlulen(*ColumnSize)); + } if (DecimalDigits) TRACE(" DecimalDigits %d\n", *DecimalDigits); if (Nullable) TRACE(" Nullable %d\n", *Nullable); } @@ -657,11 +780,15 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum */ SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle) { - struct SQLDisconnect_params params = { ConnectionHandle }; + struct SQLDisconnect_params params; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p)\n", ConnectionHandle);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLDisconnect, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -672,11 +799,15 @@ SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle) */ SQLRETURN WINAPI SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType) { - struct SQLEndTran_params params = { HandleType, Handle, CompletionType }; + struct SQLEndTran_params params = { HandleType, 0, CompletionType }; + struct handle *handle = Handle; SQLRETURN ret;
TRACE("(HandleType %d, Handle %p, CompletionType %d)\n", HandleType, Handle, CompletionType);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.Handle = handle->unix_handle; ret = ODBC_CALL( SQLEndTran, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -686,22 +817,23 @@ SQLRETURN WINAPI SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLIN * SQLError [ODBC32.010] */ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle, - SQLCHAR *Sqlstate, SQLINTEGER *NativeError, SQLCHAR *MessageText, + SQLCHAR *SqlState, SQLINTEGER *NativeError, SQLCHAR *MessageText, SQLSMALLINT BufferLength, SQLSMALLINT *TextLength) { - struct SQLError_params params = { EnvironmentHandle, ConnectionHandle, StatementHandle, Sqlstate, - NativeError, MessageText, BufferLength, TextLength }; + struct SQLError_params params = { 0, 0, 0, SqlState, NativeError, MessageText, BufferLength, TextLength }; + struct handle *env = EnvironmentHandle, *con = ConnectionHandle, *stmt = StatementHandle; SQLRETURN ret;
- TRACE("(EnvironmentHandle %p, ConnectionHandle %p, StatementHandle %p, Sqlstate %p, NativeError %p," + TRACE("(EnvironmentHandle %p, ConnectionHandle %p, StatementHandle %p, SqlState %p, NativeError %p," " MessageText %p, BufferLength %d, TextLength %p)\n", EnvironmentHandle, ConnectionHandle, - StatementHandle, Sqlstate, NativeError, MessageText, BufferLength, TextLength); - - ret = ODBC_CALL( SQLError, ¶ms ); + StatementHandle, SqlState, NativeError, MessageText, BufferLength, TextLength);
- if (ret == SQL_SUCCESS) + if (env) params.EnvironmentHandle = env->unix_handle; + if (con) params.ConnectionHandle = con->unix_handle; + if (stmt) params.StatementHandle = stmt->unix_handle; + if (SUCCESS((ret = ODBC_CALL( SQLError, ¶ms )))) { - TRACE(" SQLState %s\n", debugstr_an((const char *)Sqlstate, 5)); + TRACE(" SqlState %s\n", debugstr_an((const char *)SqlState, 5)); TRACE(" Error %d\n", *NativeError); TRACE(" MessageText %s\n", debugstr_an((const char *)MessageText, *TextLength)); } @@ -715,12 +847,16 @@ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, S */ SQLRETURN WINAPI SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength) { - struct SQLExecDirect_params params = { StatementHandle, StatementText, TextLength }; + struct SQLExecDirect_params params = { 0, StatementText, TextLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, StatementText %s, TextLength %d)\n", StatementHandle, debugstr_an((const char *)StatementText, TextLength), TextLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLExecDirect, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -731,27 +867,57 @@ SQLRETURN WINAPI SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, */ SQLRETURN WINAPI SQLExecute(SQLHSTMT StatementHandle) { - struct SQLExecute_params params = { StatementHandle }; + struct SQLExecute_params params; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p)\n", StatementHandle);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLExecute, ¶ms ); TRACE("Returning %d\n", ret); return ret; }
+static void update_result_lengths( struct handle *handle ) +{ + UINT i; + for (i = 0; i < handle->bind_col.count; i++) + { + if (handle->bind_col.param[i].ptr) + *(SQLLEN *)handle->bind_col.param[i].ptr = handle->bind_col.param[i].len; + } + for (i = 0; i < handle->bind_param.count; i++) + { + if (handle->bind_param.param[i].ptr) + *(SQLLEN *)handle->bind_param.param[i].ptr = handle->bind_param.param[i].len; + } + for (i = 0; i < handle->bind_parameter.count; i++) + { + if (handle->bind_parameter.param[i].ptr) + { + *(SQLLEN *)handle->bind_parameter.param[i].ptr = handle->bind_parameter.param[i].len; + } + } +} + /************************************************************************* * SQLFetch [ODBC32.013] */ SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle) { - struct SQLFetch_params params = { StatementHandle }; + struct SQLFetch_params params; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p)\n", StatementHandle);
- ret = ODBC_CALL( SQLFetch, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; + if (SUCCESS(( ret = ODBC_CALL( SQLFetch, ¶ms )))) update_result_lengths( handle ); TRACE("Returning %d\n", ret); return ret; } @@ -761,13 +927,17 @@ SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle) */ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLLEN FetchOffset) { - struct SQLFetchScroll_params params = { StatementHandle, FetchOrientation, FetchOffset }; + struct SQLFetchScroll_params params = { 0, FetchOrientation, FetchOffset }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, FetchOrientation %d, FetchOffset %s)\n", StatementHandle, FetchOrientation, debugstr_sqllen(FetchOffset));
- ret = ODBC_CALL( SQLFetchScroll, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; + if (SUCCESS(( ret = ODBC_CALL( SQLFetchScroll, ¶ms )))) update_result_lengths( handle ); TRACE("Returning %d\n", ret); return ret; } @@ -777,12 +947,17 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien */ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) { - struct SQLFreeConnect_params params = { ConnectionHandle }; + struct SQLFreeConnect_params params; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p)\n", ConnectionHandle);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLFreeConnect, ¶ms ); + free( handle ); TRACE("Returning %d\n", ret); return ret; } @@ -792,27 +967,46 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) */ SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle) { - struct SQLFreeEnv_params params = { EnvironmentHandle }; + struct SQLFreeEnv_params params; + struct handle *handle = EnvironmentHandle; SQLRETURN ret;
TRACE("(EnvironmentHandle %p)\n", EnvironmentHandle);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.EnvironmentHandle = handle->unix_handle; ret = ODBC_CALL( SQLFreeEnv, ¶ms ); + free( handle ); TRACE("Returning %d\n", ret); return ret; }
+static void free_bindings( struct handle *handle ) +{ + free( handle->bind_col.param ); + free( handle->bind_param.param ); + free( handle->bind_parameter.param ); +} + /************************************************************************* * SQLFreeHandle [ODBC32.031] */ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) { - struct SQLFreeHandle_params params = { HandleType, Handle }; + struct SQLFreeHandle_params params; + struct handle *handle = Handle; SQLRETURN ret;
TRACE("(HandleType %d, Handle %p)\n", HandleType, Handle);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.HandleType = HandleType; + params.Handle = handle->unix_handle; ret = ODBC_CALL( SQLFreeHandle, ¶ms ); + free_bindings( handle ); + free( handle ); TRACE ("Returning %d\n", ret); return ret; } @@ -822,12 +1016,19 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) */ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) { - struct SQLFreeStmt_params params = { StatementHandle, Option }; + struct SQLFreeStmt_params params; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, Option %d)\n", StatementHandle, Option);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; + params.Option = Option; ret = ODBC_CALL( SQLFreeStmt, ¶ms ); + free_bindings( handle ); + free( handle ); TRACE("Returning %d\n", ret); return ret; } @@ -838,12 +1039,16 @@ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { - struct SQLGetConnectAttr_params params = { ConnectionHandle, Attribute, Value, BufferLength, StringLength }; + struct SQLGetConnectAttr_params params = { 0, Attribute, Value, BufferLength, StringLength }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, Attribute %d, Value %p, BufferLength %d, StringLength %p)\n", ConnectionHandle, Attribute, Value, BufferLength, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetConnectAttr, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -854,11 +1059,15 @@ SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut */ SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value) { - struct SQLGetConnectOption_params params = { ConnectionHandle, Option, Value }; + struct SQLGetConnectOption_params params = { 0, Option, Value }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, Option %d, Value %p)\n", ConnectionHandle, Option, Value);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetConnectOption, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -870,12 +1079,16 @@ SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength) { - struct SQLGetCursorName_params params = { StatementHandle, CursorName, BufferLength, NameLength }; + struct SQLGetCursorName_params params = { 0, CursorName, BufferLength, NameLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, CursorName %p, BufferLength %d, NameLength %p)\n", StatementHandle, CursorName, BufferLength, NameLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetCursorName, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -887,14 +1100,19 @@ SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLLEN BufferLength, SQLLEN *StrLen_or_Ind) { - struct SQLGetData_params params = { StatementHandle, ColumnNumber, TargetType, TargetValue, - BufferLength, StrLen_or_Ind }; + struct SQLGetData_params params = { 0, ColumnNumber, TargetType, TargetValue, BufferLength }; + struct handle *handle = StatementHandle; + INT64 len; SQLRETURN ret;
TRACE("(StatementHandle %p, ColumnNumber %d, TargetType %d, TargetValue %p, BufferLength %s, StrLen_or_Ind %p)\n", StatementHandle, ColumnNumber, TargetType, TargetValue, debugstr_sqllen(BufferLength), StrLen_or_Ind);
- ret = ODBC_CALL( SQLGetData, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; + params.StrLen_or_Ind = &len; + if (SUCCESS((ret = ODBC_CALL( SQLGetData, ¶ms )))) *StrLen_or_Ind = len; TRACE("Returning %d\n", ret); return ret; } @@ -905,13 +1123,16 @@ SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLRETURN WINAPI SQLGetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { - struct SQLGetDescField_params params = { DescriptorHandle, RecNumber, FieldIdentifier, Value, - BufferLength, StringLength }; + struct SQLGetDescField_params params = { 0, RecNumber, FieldIdentifier, Value, BufferLength, StringLength }; + struct handle *handle = DescriptorHandle; SQLRETURN ret;
TRACE("(DescriptorHandle %p, RecNumber %d, FieldIdentifier %d, Value %p, BufferLength %d, StringLength %p)\n", DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.DescriptorHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetDescField, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -925,15 +1146,21 @@ SQLRETURN WINAPI SQLGetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision, SQLSMALLINT *Scale, SQLSMALLINT *Nullable) { - struct SQLGetDescRec_params params = { DescriptorHandle, RecNumber, Name, BufferLength, StringLength, - Type, SubType, Length, Precision, Scale, Nullable }; + struct SQLGetDescRec_params params = { 0, RecNumber, Name, BufferLength, StringLength, Type, SubType, NULL, + Precision, Scale, Nullable }; + struct handle *handle = DescriptorHandle; + INT64 len; SQLRETURN ret;
TRACE("(DescriptorHandle %p, RecNumber %d, Name %p, BufferLength %d, StringLength %p, Type %p, SubType %p," " Length %p, Precision %p, Scale %p, Nullable %p)\n", DescriptorHandle, RecNumber, Name, BufferLength, StringLength, Type, SubType, Length, Precision, Scale, Nullable);
- ret = ODBC_CALL( SQLGetDescRec, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.DescriptorHandle = handle->unix_handle; + params.Length = &len; + if (SUCCESS((ret = ODBC_CALL( SQLGetDescRec, ¶ms )))) *Length = len; TRACE("Returning %d\n", ret); return ret; } @@ -945,13 +1172,17 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { - struct SQLGetDiagField_params params = { HandleType, Handle, RecNumber, DiagIdentifier, DiagInfo, - BufferLength, StringLength }; + struct SQLGetDiagField_params params = { HandleType, 0, RecNumber, DiagIdentifier, DiagInfo, BufferLength, + StringLength }; + struct handle *handle = Handle; SQLRETURN ret;
TRACE("(HandleType %d, Handle %p, RecNumber %d, DiagIdentifier %d, DiagInfo %p, BufferLength %d," " StringLength %p)\n", HandleType, Handle, RecNumber, DiagIdentifier, DiagInfo, BufferLength, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.Handle = handle->unix_handle; ret = ODBC_CALL( SQLGetDiagField, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -961,17 +1192,21 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM * SQLGetDiagRec [ODBC32.036] */ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, - SQLCHAR *Sqlstate, SQLINTEGER *NativeError, SQLCHAR *MessageText, + SQLCHAR *SqlState, SQLINTEGER *NativeError, SQLCHAR *MessageText, SQLSMALLINT BufferLength, SQLSMALLINT *TextLength) { - struct SQLGetDiagRec_params params = { HandleType, Handle, RecNumber, Sqlstate, NativeError, - MessageText, BufferLength, TextLength }; + struct SQLGetDiagRec_params params = { HandleType, 0, RecNumber, SqlState, NativeError, MessageText, + BufferLength, TextLength }; + struct handle *handle = Handle; SQLRETURN ret;
- TRACE("(HandleType %d, Handle %p, RecNumber %d, Sqlstate %p, NativeError %p, MessageText %p, BufferLength %d," - " TextLength %p)\n", HandleType, Handle, RecNumber, Sqlstate, NativeError, MessageText, BufferLength, + TRACE("(HandleType %d, Handle %p, RecNumber %d, SqlState %p, NativeError %p, MessageText %p, BufferLength %d," + " TextLength %p)\n", HandleType, Handle, RecNumber, SqlState, NativeError, MessageText, BufferLength, TextLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.Handle = handle->unix_handle; ret = ODBC_CALL( SQLGetDiagRec, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -983,12 +1218,16 @@ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMAL SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { - struct SQLGetEnvAttr_params params = { EnvironmentHandle, Attribute, Value, BufferLength, StringLength }; + struct SQLGetEnvAttr_params params = { 0, Attribute, Value, BufferLength, StringLength }; + struct handle *handle = EnvironmentHandle; SQLRETURN ret;
TRACE("(EnvironmentHandle %p, Attribute %d, Value %p, BufferLength %d, StringLength %p)\n", EnvironmentHandle, Attribute, Value, BufferLength, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.EnvironmentHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetEnvAttr, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -999,11 +1238,15 @@ SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported) { - struct SQLGetFunctions_params params = { ConnectionHandle, FunctionId, Supported }; + struct SQLGetFunctions_params params = { 0, FunctionId, Supported }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, FunctionId %d, Supported %p)\n", ConnectionHandle, FunctionId, Supported);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetFunctions, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1015,12 +1258,16 @@ SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT Function SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { - struct SQLGetInfo_params params = { ConnectionHandle, InfoType, InfoValue, BufferLength, StringLength }; + struct SQLGetInfo_params params = { 0, InfoType, InfoValue, BufferLength, StringLength }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle, %p, InfoType %d, InfoValue %p, BufferLength %d, StringLength %p)\n", ConnectionHandle, InfoType, InfoValue, BufferLength, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetInfo, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1032,7 +1279,8 @@ SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQL SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { - struct SQLGetStmtAttr_params params = { StatementHandle, Attribute, Value, BufferLength, StringLength }; + struct SQLGetStmtAttr_params params = { 0, Attribute, Value, BufferLength, StringLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, Attribute %d, Value %p, BufferLength %d, StringLength %p)\n", StatementHandle, @@ -1044,6 +1292,9 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, return SQL_ERROR; }
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetStmtAttr, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1054,11 +1305,15 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLPOINTER Value) { - struct SQLGetStmtOption_params params = { StatementHandle, Option, Value }; + struct SQLGetStmtOption_params params = { 0, Option, Value }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, Option %d, Value %p)\n", StatementHandle, Option, Value);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetStmtOption, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1069,11 +1324,15 @@ SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, */ SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType) { - struct SQLGetTypeInfo_params params = { StatementHandle, DataType }; + struct SQLGetTypeInfo_params params = { 0, DataType }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, DataType %d)\n", StatementHandle, DataType);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetTypeInfo, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1084,11 +1343,15 @@ SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType) */ SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount) { - struct SQLNumResultCols_params params = { StatementHandle, ColumnCount }; + struct SQLNumResultCols_params params = { 0, ColumnCount }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, ColumnCount %p)\n", StatementHandle, ColumnCount);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLNumResultCols, ¶ms ); TRACE("Returning %d ColumnCount %d\n", ret, *ColumnCount); return ret; @@ -1099,11 +1362,15 @@ SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnC */ SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value) { - struct SQLParamData_params params = { StatementHandle, Value }; + struct SQLParamData_params params = { 0, Value }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, Value %p)\n", StatementHandle, Value);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLParamData, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1114,12 +1381,16 @@ SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value) */ SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength) { - struct SQLPrepare_params params = { StatementHandle, StatementText, TextLength }; + struct SQLPrepare_params params = { 0, StatementText, TextLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, StatementText %s, TextLength %d)\n", StatementHandle, debugstr_an((const char *)StatementText, TextLength), TextLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLPrepare, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1130,11 +1401,15 @@ SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQ */ SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN StrLen_or_Ind) { - struct SQLPutData_params params = { StatementHandle, Data, StrLen_or_Ind }; + struct SQLPutData_params params = { 0, Data, StrLen_or_Ind }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, Data %p, StrLen_or_Ind %s)\n", StatementHandle, Data, debugstr_sqllen(StrLen_or_Ind));
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLPutData, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1145,13 +1420,22 @@ SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN St */ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount) { - struct SQLRowCount_params params = { StatementHandle, RowCount }; + struct SQLRowCount_params params; + struct handle *handle = StatementHandle; + INT64 count; SQLRETURN ret;
TRACE("(StatementHandle %p, RowCount %p)\n", StatementHandle, RowCount);
- ret = ODBC_CALL( SQLRowCount, ¶ms ); - if (ret == SQL_SUCCESS && RowCount) TRACE(" RowCount %s\n", debugstr_sqllen(*RowCount)); + if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; + params.RowCount = &count; + if (SUCCESS((ret = ODBC_CALL( SQLRowCount, ¶ms ))) && RowCount) + { + *RowCount = count; + TRACE(" RowCount %s\n", debugstr_sqllen(*RowCount)); + } TRACE("Returning %d\n", ret); return ret; } @@ -1162,12 +1446,16 @@ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount) SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { - struct SQLSetConnectAttr_params params = { ConnectionHandle, Attribute, Value, StringLength }; + struct SQLSetConnectAttr_params params = { 0, Attribute, Value, StringLength }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, Attribute %d, Value %p, StringLength %d)\n", ConnectionHandle, Attribute, Value, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetConnectAttr, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1178,11 +1466,15 @@ SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut */ SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value) { - struct SQLSetConnectOption_params params = { ConnectionHandle, Option, Value }; + struct SQLSetConnectOption_params params = { 0, Option, Value }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, Option %d, Value %s)\n", ConnectionHandle, Option, debugstr_sqlulen(Value));
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetConnectOption, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1193,12 +1485,16 @@ SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti */ SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT NameLength) { - struct SQLSetCursorName_params params = { StatementHandle, CursorName, NameLength }; + struct SQLSetCursorName_params params = { 0, CursorName, NameLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, CursorName %s, NameLength %d)\n", StatementHandle, debugstr_an((const char *)CursorName, NameLength), NameLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetCursorName, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1210,12 +1506,16 @@ SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLRETURN WINAPI SQLSetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength) { - struct SQLSetDescField_params params = { DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength }; + struct SQLSetDescField_params params = { 0, RecNumber, FieldIdentifier, Value, BufferLength }; + struct handle *handle = DescriptorHandle; SQLRETURN ret;
TRACE("(DescriptorHandle %p, RecNumber %d, FieldIdentifier %d, Value %p, BufferLength %d)\n", DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.DescriptorHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetDescField, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1228,14 +1528,25 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT SubType, SQLLEN Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLLEN *StringLength, SQLLEN *Indicator) { - struct SQLSetDescRec_params params = { DescriptorHandle, RecNumber, Type, SubType, Length, Precision, Scale, Data, StringLength, Indicator }; + struct SQLSetDescRec_params params = { 0, RecNumber, Type, SubType, Length, Precision, Scale, Data }; + struct handle *handle = DescriptorHandle; + INT64 stringlen, indicator; SQLRETURN ret;
TRACE("(DescriptorHandle %p, RecNumber %d, Type %d, SubType %d, Length %s, Precision %d, Scale %d, Data %p," " StringLength %p, Indicator %p)\n", DescriptorHandle, RecNumber, Type, SubType, debugstr_sqllen(Length), Precision, Scale, Data, StringLength, Indicator);
- ret = ODBC_CALL( SQLSetDescRec, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.DescriptorHandle = handle->unix_handle; + params.StringLength = &stringlen; + params.Indicator = &indicator; + if (SUCCESS((ret = ODBC_CALL( SQLSetDescRec, ¶ms )))) + { + *StringLength = stringlen; + *Indicator = indicator; + } TRACE("Returning %d\n", ret); return ret; } @@ -1246,12 +1557,16 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLRETURN WINAPI SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { - struct SQLSetEnvAttr_params params = { EnvironmentHandle, Attribute, Value, StringLength }; + struct SQLSetEnvAttr_params params = { 0, Attribute, Value, StringLength }; + struct handle *handle = EnvironmentHandle; SQLRETURN ret;
TRACE("(EnvironmentHandle %p, Attribute %d, Value %p, StringLength %d)\n", EnvironmentHandle, Attribute, Value, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.EnvironmentHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetEnvAttr, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1264,15 +1579,21 @@ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNum SQLSMALLINT ParameterType, SQLULEN LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLLEN *StrLen_or_Ind) { - struct SQLSetParam_params params = { StatementHandle, ParameterNumber, ValueType, ParameterType, - LengthPrecision, ParameterScale, ParameterValue, StrLen_or_Ind }; + struct SQLSetParam_params params = { 0, ParameterNumber, ValueType, ParameterType, LengthPrecision, ParameterScale, + ParameterValue }; + struct handle *handle = StatementHandle; + INT64 len; SQLRETURN ret;
TRACE("(StatementHandle %p, ParameterNumber %d, ValueType %d, ParameterType %d, LengthPrecision %s," " ParameterScale %d, ParameterValue %p, StrLen_or_Ind %p)\n", StatementHandle, ParameterNumber, ValueType, ParameterType, debugstr_sqlulen(LengthPrecision), ParameterScale, ParameterValue, StrLen_or_Ind);
- ret = ODBC_CALL( SQLSetParam, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; + params.StrLen_or_Ind = &len; + if (SUCCESS((ret = ODBC_CALL( SQLSetParam, ¶ms )))) *StrLen_or_Ind = len; TRACE("Returning %d\n", ret); return ret; } @@ -1283,12 +1604,16 @@ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNum SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { - struct SQLSetStmtAttr_params params = { StatementHandle, Attribute, Value, StringLength }; + struct SQLSetStmtAttr_params params = { 0, Attribute, Value, StringLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, Attribute %d, Value %p, StringLength %d)\n", StatementHandle, Attribute, Value, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetStmtAttr, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1299,11 +1624,15 @@ SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLSetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLULEN Value) { - struct SQLSetStmtOption_params params = { StatementHandle, Option, Value }; + struct SQLSetStmtOption_params params = { 0, Option, Value }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, Option %d, Value %s)\n", StatementHandle, Option, debugstr_sqlulen(Value));
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetStmtOption, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1317,8 +1646,9 @@ SQLRETURN WINAPI SQLSpecialColumns(SQLHSTMT StatementHandle, SQLUSMALLINT Identi SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SQLUSMALLINT Nullable) { - struct SQLSpecialColumns_params params = { StatementHandle, IdentifierType, CatalogName, NameLength1, - SchemaName, NameLength2, TableName, NameLength3, Scope, Nullable }; + struct SQLSpecialColumns_params params = { 0, IdentifierType, CatalogName, NameLength1, SchemaName, NameLength2, + TableName, NameLength3, Scope, Nullable }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, IdentifierType %d, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d," @@ -1327,6 +1657,9 @@ SQLRETURN WINAPI SQLSpecialColumns(SQLHSTMT StatementHandle, SQLUSMALLINT Identi debugstr_an((const char *)SchemaName, NameLength2), NameLength2, debugstr_an((const char *)TableName, NameLength3), NameLength3, Scope, Nullable);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLSpecialColumns, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1339,8 +1672,9 @@ SQLRETURN WINAPI SQLStatistics(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, S SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved) { - struct SQLStatistics_params params = { StatementHandle, CatalogName, NameLength1, SchemaName, - NameLength2, TableName, NameLength3, Unique, Reserved }; + struct SQLStatistics_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, TableName, + NameLength3, Unique, Reserved }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d SchemaName %s, NameLength2 %d, TableName %s" @@ -1349,6 +1683,9 @@ SQLRETURN WINAPI SQLStatistics(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, S debugstr_an((const char *)SchemaName, NameLength2), NameLength2, debugstr_an((const char *)TableName, NameLength3), NameLength3, Unique, Reserved);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLStatistics, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1361,8 +1698,9 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *TableType, SQLSMALLINT NameLength4) { - struct SQLTables_params params = { StatementHandle, CatalogName, NameLength1, SchemaName, NameLength2, - TableName, NameLength3, TableType, NameLength4 }; + struct SQLTables_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, TableName, + NameLength3, TableType, NameLength4 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s," @@ -1372,6 +1710,9 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM debugstr_an((const char *)TableName, NameLength3), NameLength3, debugstr_an((const char *)TableType, NameLength4), NameLength4);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLTables, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1382,12 +1723,17 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM */ SQLRETURN WINAPI SQLTransact(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLUSMALLINT CompletionType) { - struct SQLTransact_params params = { EnvironmentHandle, ConnectionHandle, CompletionType }; + struct SQLTransact_params params = { 0, 0, CompletionType }; + struct handle *env = EnvironmentHandle, *con = ConnectionHandle; SQLRETURN ret;
TRACE("(EnvironmentHandle %p, ConnectionHandle %p, CompletionType %d)\n", EnvironmentHandle, ConnectionHandle, CompletionType);
+ if (!env || !con) return SQL_INVALID_HANDLE; + + params.EnvironmentHandle = env->unix_handle; + params.ConnectionHandle = con->unix_handle; ret = ODBC_CALL( SQLTransact, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1396,18 +1742,21 @@ SQLRETURN WINAPI SQLTransact(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle /************************************************************************* * SQLBrowseConnect [ODBC32.055] */ -SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC hdbc, SQLCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn, - SQLCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, - SQLSMALLINT *pcbConnStrOut) +SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectionString, SQLSMALLINT StringLength1, + SQLCHAR *OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength2) { - struct SQLBrowseConnect_params params = { hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, - cbConnStrOutMax, pcbConnStrOut }; + struct SQLBrowseConnect_params params = { 0, InConnectionString, StringLength1, OutConnectionString, BufferLength, + StringLength2 }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
- TRACE("(hdbc %p, szConnStrIn %s, cbConnStrIn %d, szConnStrOut %p, cbConnStrOutMax %d, pcbConnStrOut %p)\n", - hdbc, debugstr_an((const char *)szConnStrIn, cbConnStrIn), cbConnStrIn, szConnStrOut, cbConnStrOutMax, - pcbConnStrOut); + TRACE("(ConnectionHandle %p, InConnectionString %s, StringLength1 %d, OutConnectionString %p, BufferLength, %d, " + "StringLength2 %p)\n", ConnectionHandle, debugstr_an((const char *)InConnectionString, StringLength1), + StringLength1, OutConnectionString, BufferLength, StringLength2); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLBrowseConnect, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1418,12 +1767,16 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC hdbc, SQLCHAR *szConnStrIn, SQLSMALLIN */ SQLRETURN WINAPI SQLBulkOperations(SQLHSTMT StatementHandle, SQLSMALLINT Operation) { - struct SQLBulkOperations_params params = { StatementHandle, Operation }; + struct SQLBulkOperations_params params = { 0, Operation }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, Operation %d)\n", StatementHandle, Operation);
- ret = ODBC_CALL( SQLBulkOperations, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; + if (SUCCESS(( ret = ODBC_CALL( SQLBulkOperations, ¶ms )))) update_result_lengths( handle ); TRACE("Returning %d\n", ret); return ret; } @@ -1431,17 +1784,25 @@ SQLRETURN WINAPI SQLBulkOperations(SQLHSTMT StatementHandle, SQLSMALLINT Operati /************************************************************************* * SQLColAttributes [ODBC32.006] */ -SQLRETURN WINAPI SQLColAttributes(SQLHSTMT hstmt, SQLUSMALLINT icol, SQLUSMALLINT fDescType, - SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT *pcbDesc, - SQLLEN *pfDesc) +SQLRETURN WINAPI SQLColAttributes(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, + SQLPOINTER CharacterAttributes, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, + SQLLEN *NumericAttributes) { - struct SQLColAttributes_params params = { hstmt, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc }; + struct SQLColAttributes_params params = { 0, ColumnNumber, FieldIdentifier, CharacterAttributes, BufferLength, + StringLength }; + struct handle *handle = StatementHandle; + INT64 attrs; SQLRETURN ret;
- TRACE("(hstmt %p, icol %d, fDescType %d, rgbDesc %p, cbDescMax %d, pcbDesc %p, pfDesc %p)\n", hstmt, icol, - fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc); + TRACE("(StatementHandle %p, ColumnNumber %d, FieldIdentifier %d, CharacterAttributes %p, BufferLength %d, " + "StringLength %p, NumericAttributes %p)\n", StatementHandle, ColumnNumber, FieldIdentifier, + CharacterAttributes, BufferLength, StringLength, NumericAttributes); + + if (!handle) return SQL_INVALID_HANDLE;
- ret = ODBC_CALL( SQLColAttributes, ¶ms ); + params.StatementHandle = handle->unix_handle; + params.NumericAttributes = &attrs; + if (SUCCESS((ret = ODBC_CALL( SQLColAttributes, ¶ms )))) *NumericAttributes = attrs; TRACE("Returning %d\n", ret); return ret; } @@ -1449,21 +1810,25 @@ SQLRETURN WINAPI SQLColAttributes(SQLHSTMT hstmt, SQLUSMALLINT icol, SQLUSMALLIN /************************************************************************* * SQLColumnPrivileges [ODBC32.056] */ -SQLRETURN WINAPI SQLColumnPrivileges(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, - SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, - SQLSMALLINT cbTableName, SQLCHAR *szColumnName, SQLSMALLINT cbColumnName) +SQLRETURN WINAPI SQLColumnPrivileges(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, + SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, + SQLSMALLINT NameLength3, SQLCHAR *ColumnName, SQLSMALLINT NameLength4) { - struct SQLColumnPrivileges_params params = { hstmt, szCatalogName, cbCatalogName, szSchemaName, - cbSchemaName, szTableName, cbTableName, szColumnName, cbColumnName }; + struct SQLColumnPrivileges_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, + TableName, NameLength3, ColumnName, NameLength4 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s," - " cbTableName %d, szColumnName %s, cbColumnName %d)\n", hstmt, - debugstr_an((const char *)szCatalogName, cbCatalogName), cbCatalogName, - debugstr_an((const char *)szSchemaName, cbSchemaName), cbSchemaName, - debugstr_an((const char *)szTableName, cbTableName), cbTableName, - debugstr_an((const char *)szColumnName, cbColumnName), cbColumnName); + TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s," + " NameLength3 %d, ColumnName %s, NameLength4 %d)\n", StatementHandle, + debugstr_an((const char *)CatalogName, NameLength1), NameLength1, + debugstr_an((const char *)SchemaName, NameLength2), NameLength2, + debugstr_an((const char *)TableName, NameLength3), NameLength3, + debugstr_an((const char *)ColumnName, NameLength4), NameLength4); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLColumnPrivileges, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1472,16 +1837,22 @@ SQLRETURN WINAPI SQLColumnPrivileges(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQL /************************************************************************* * SQLDescribeParam [ODBC32.058] */ -SQLRETURN WINAPI SQLDescribeParam(SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT *pfSqlType, - SQLULEN *pcbParamDef, SQLSMALLINT *pibScale, SQLSMALLINT *pfNullable) +SQLRETURN WINAPI SQLDescribeParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT *DataType, + SQLULEN *ParameterSize, SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable) { - struct SQLDescribeParam_params params = { hstmt, ipar, pfSqlType, pcbParamDef, pibScale, pfNullable }; + struct SQLDescribeParam_params params = { 0, ParameterNumber, DataType, NULL, DecimalDigits, Nullable }; + struct handle *handle = StatementHandle; + UINT64 size; SQLRETURN ret;
- TRACE("(hstmt %p, ipar %d, pfSqlType %p, pcbParamDef %p, pibScale %p, pfNullable %p)\n", hstmt, ipar, - pfSqlType, pcbParamDef, pibScale, pfNullable); + TRACE("(StatementHandle %p, ParameterNumber %d, DataType %p, ParameterSize %p, DecimalDigits %p, Nullable %p)\n", + StatementHandle, ParameterNumber, DataType, ParameterSize, DecimalDigits, Nullable);
- ret = ODBC_CALL( SQLDescribeParam, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; + params.ParameterSize = &size; + if (SUCCESS((ret = ODBC_CALL( SQLDescribeParam, ¶ms )))) *ParameterSize = size; TRACE("Returning %d\n", ret); return ret; } @@ -1489,16 +1860,22 @@ SQLRETURN WINAPI SQLDescribeParam(SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT /************************************************************************* * SQLExtendedFetch [ODBC32.059] */ -SQLRETURN WINAPI SQLExtendedFetch(SQLHSTMT hstmt, SQLUSMALLINT fFetchType, SQLLEN irow, SQLULEN *pcrow, - SQLUSMALLINT *rgfRowStatus) +SQLRETURN WINAPI SQLExtendedFetch(SQLHSTMT StatementHandle, SQLUSMALLINT FetchOrientation, SQLLEN FetchOffset, + SQLULEN *RowCount, SQLUSMALLINT *RowStatusArray) { - struct SQLExtendedFetch_params params = { hstmt, fFetchType, irow, pcrow, rgfRowStatus }; + struct SQLExtendedFetch_params params = { 0, FetchOrientation, FetchOffset, NULL, RowStatusArray }; + struct handle *handle = StatementHandle; + UINT64 count; SQLRETURN ret;
- TRACE("(hstmt %p, fFetchType %d, irow %s, pcrow %p, rgfRowStatus %p)\n", hstmt, fFetchType, debugstr_sqllen(irow), - pcrow, rgfRowStatus); + TRACE("(StatementHandle %p, FetchOrientation %d, FetchOffset %s, RowCount %p, RowStatusArray %p)\n", + StatementHandle, FetchOrientation, debugstr_sqllen(FetchOffset), RowCount, RowStatusArray); + + if (!handle) return SQL_INVALID_HANDLE;
- ret = ODBC_CALL( SQLExtendedFetch, ¶ms ); + params.StatementHandle = handle->unix_handle; + params.RowCount = &count; + if (SUCCESS((ret = ODBC_CALL( SQLExtendedFetch, ¶ms )))) *RowCount = count; TRACE("Returning %d\n", ret); return ret; } @@ -1506,28 +1883,31 @@ SQLRETURN WINAPI SQLExtendedFetch(SQLHSTMT hstmt, SQLUSMALLINT fFetchType, SQLLE /************************************************************************* * SQLForeignKeys [ODBC32.060] */ -SQLRETURN WINAPI SQLForeignKeys(SQLHSTMT hstmt, SQLCHAR *szPkCatalogName, SQLSMALLINT cbPkCatalogName, - SQLCHAR *szPkSchemaName, SQLSMALLINT cbPkSchemaName, SQLCHAR *szPkTableName, - SQLSMALLINT cbPkTableName, SQLCHAR *szFkCatalogName, - SQLSMALLINT cbFkCatalogName, SQLCHAR *szFkSchemaName, - SQLSMALLINT cbFkSchemaName, SQLCHAR *szFkTableName, SQLSMALLINT cbFkTableName) +SQLRETURN WINAPI SQLForeignKeys(SQLHSTMT StatementHandle, SQLCHAR *PkCatalogName, SQLSMALLINT NameLength1, + SQLCHAR *PkSchemaName, SQLSMALLINT NameLength2, SQLCHAR *PkTableName, + SQLSMALLINT NameLength3, SQLCHAR *FkCatalogName, SQLSMALLINT NameLength4, + SQLCHAR *FkSchemaName, SQLSMALLINT NameLength5, SQLCHAR *FkTableName, + SQLSMALLINT NameLength6) { - struct SQLForeignKeys_params params = { hstmt, szPkCatalogName, cbPkCatalogName, szPkSchemaName, - cbPkSchemaName, szPkTableName, cbPkTableName, szFkCatalogName, - cbFkCatalogName, szFkSchemaName, cbFkSchemaName, - szFkTableName, cbFkTableName }; + struct SQLForeignKeys_params params = { 0, PkCatalogName, NameLength1, PkSchemaName, NameLength2, + PkTableName, NameLength3, FkCatalogName, NameLength4, + FkSchemaName, NameLength5, FkTableName, NameLength6 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szPkCatalogName %s, cbPkCatalogName %d, szPkSchemaName %s, cbPkSchemaName %d," - " szPkTableName %s, cbPkTableName %d, szFkCatalogName %s, cbFkCatalogName %d, szFkSchemaName %s," - " cbFkSchemaName %d, szFkTableName %s, cbFkTableName %d)\n", hstmt, - debugstr_an((const char *)szPkCatalogName, cbPkCatalogName), cbPkCatalogName, - debugstr_an((const char *)szPkSchemaName, cbPkSchemaName), cbPkSchemaName, - debugstr_an((const char *)szPkTableName, cbPkTableName), cbPkTableName, - debugstr_an((const char *)szFkCatalogName, cbFkCatalogName), cbFkCatalogName, - debugstr_an((const char *)szFkSchemaName, cbFkSchemaName), cbFkSchemaName, - debugstr_an((const char *)szFkTableName, cbFkTableName), cbFkTableName); + TRACE("(StatementHandle %p, PkCatalogName %s, NameLength1 %d, PkSchemaName %s, NameLength2 %d," + " PkTableName %s, NameLength3 %d, FkCatalogName %s, NameLength4 %d, FkSchemaName %s," + " NameLength5 %d, FkTableName %s, NameLength6 %d)\n", StatementHandle, + debugstr_an((const char *)PkCatalogName, NameLength1), NameLength1, + debugstr_an((const char *)PkSchemaName, NameLength2), NameLength2, + debugstr_an((const char *)PkTableName, NameLength3), NameLength3, + debugstr_an((const char *)FkCatalogName, NameLength4), NameLength4, + debugstr_an((const char *)FkSchemaName, NameLength5), NameLength5, + debugstr_an((const char *)FkTableName, NameLength6), NameLength6); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLForeignKeys, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1538,11 +1918,15 @@ SQLRETURN WINAPI SQLForeignKeys(SQLHSTMT hstmt, SQLCHAR *szPkCatalogName, SQLSMA */ SQLRETURN WINAPI SQLMoreResults(SQLHSTMT StatementHandle) { - struct SQLMoreResults_params params = { StatementHandle }; + struct SQLMoreResults_params params; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(%p)\n", StatementHandle);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLMoreResults, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1551,15 +1935,21 @@ SQLRETURN WINAPI SQLMoreResults(SQLHSTMT StatementHandle) /************************************************************************* * SQLNativeSql [ODBC32.062] */ -SQLRETURN WINAPI SQLNativeSql(SQLHDBC hdbc, SQLCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLCHAR *szSqlStr, - SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr) +SQLRETURN WINAPI SQLNativeSql(SQLHDBC ConnectionHandle, SQLCHAR *InStatementText, SQLINTEGER TextLength1, + SQLCHAR *OutStatementText, SQLINTEGER BufferLength, SQLINTEGER *TextLength2) { - struct SQLNativeSql_params params = { hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr }; + struct SQLNativeSql_params params = { 0, InStatementText, TextLength1, OutStatementText, BufferLength, + TextLength2 }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
- TRACE("(hdbc %p, szSqlStrIn %s, cbSqlStrIn %d, szSqlStr %p, cbSqlStrMax %d, pcbSqlStr %p)\n", hdbc, - debugstr_an((const char *)szSqlStrIn, cbSqlStrIn), cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr); + TRACE("(ConnectionHandle %p, InStatementText %s, TextLength1 %d, OutStatementText %p, BufferLength, %d, " + "TextLength2 %p)\n", ConnectionHandle, debugstr_an((const char *)InStatementText, TextLength1), + TextLength1, OutStatementText, BufferLength, TextLength2); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLNativeSql, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1568,13 +1958,17 @@ SQLRETURN WINAPI SQLNativeSql(SQLHDBC hdbc, SQLCHAR *szSqlStrIn, SQLINTEGER cbSq /************************************************************************* * SQLNumParams [ODBC32.063] */ -SQLRETURN WINAPI SQLNumParams(SQLHSTMT hstmt, SQLSMALLINT *pcpar) +SQLRETURN WINAPI SQLNumParams(SQLHSTMT StatementHandle, SQLSMALLINT *ParameterCount) { - struct SQLNumParams_params params = { hstmt, pcpar }; + struct SQLNumParams_params params = { 0, ParameterCount }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, pcpar %p)\n", hstmt, pcpar); + TRACE("(StatementHandle %p, pcpar %p)\n", StatementHandle, ParameterCount); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLNumParams, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1583,14 +1977,21 @@ SQLRETURN WINAPI SQLNumParams(SQLHSTMT hstmt, SQLSMALLINT *pcpar) /************************************************************************* * SQLParamOptions [ODBC32.064] */ -SQLRETURN WINAPI SQLParamOptions(SQLHSTMT hstmt, SQLULEN crow, SQLULEN *pirow) +SQLRETURN WINAPI SQLParamOptions(SQLHSTMT StatementHandle, SQLULEN RowCount, SQLULEN *RowNumber) { - struct SQLParamOptions_params params = { hstmt, crow, pirow }; + struct SQLParamOptions_params params = { 0, RowCount }; + struct handle *handle = StatementHandle; + UINT64 row; SQLRETURN ret;
- TRACE("(hstmt %p, crow %s, pirow %p)\n", hstmt, debugstr_sqlulen(crow), pirow); + TRACE("(StatementHandle %p, RowCount %s, RowNumber %p)\n", StatementHandle, debugstr_sqlulen(RowCount), + RowNumber);
- ret = ODBC_CALL( SQLParamOptions, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; + params.RowNumber = &row; + if (SUCCESS((ret = ODBC_CALL( SQLParamOptions, ¶ms )))) *RowNumber = row; TRACE("Returning %d\n", ret); return ret; } @@ -1598,20 +1999,24 @@ SQLRETURN WINAPI SQLParamOptions(SQLHSTMT hstmt, SQLULEN crow, SQLULEN *pirow) /************************************************************************* * SQLPrimaryKeys [ODBC32.065] */ -SQLRETURN WINAPI SQLPrimaryKeys(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, - SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, - SQLSMALLINT cbTableName) +SQLRETURN WINAPI SQLPrimaryKeys(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, + SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, + SQLSMALLINT NameLength3) { - struct SQLPrimaryKeys_params params = { hstmt, szCatalogName, cbCatalogName, szSchemaName, - cbSchemaName, szTableName, cbTableName }; + struct SQLPrimaryKeys_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, TableName, + NameLength3 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s," - " cbTableName %d)\n", hstmt, - debugstr_an((const char *)szCatalogName, cbCatalogName), cbCatalogName, - debugstr_an((const char *)szSchemaName, cbSchemaName), cbSchemaName, - debugstr_an((const char *)szTableName, cbTableName), cbTableName); + TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s," + " NameLength3 %d)\n", StatementHandle, + debugstr_an((const char *)CatalogName, NameLength1), NameLength1, + debugstr_an((const char *)SchemaName, NameLength2), NameLength2, + debugstr_an((const char *)TableName, NameLength3), NameLength3); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLPrimaryKeys, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1620,22 +2025,25 @@ SQLRETURN WINAPI SQLPrimaryKeys(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALL /************************************************************************* * SQLProcedureColumns [ODBC32.066] */ -SQLRETURN WINAPI SQLProcedureColumns(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, - SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szProcName, - SQLSMALLINT cbProcName, SQLCHAR *szColumnName, SQLSMALLINT cbColumnName) +SQLRETURN WINAPI SQLProcedureColumns(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, + SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *ProcName, + SQLSMALLINT NameLength3, SQLCHAR *ColumnName, SQLSMALLINT NameLength4) { - struct SQLProcedureColumns_params params = { hstmt, szCatalogName, cbCatalogName, szSchemaName, - cbSchemaName, szProcName, cbProcName, - szColumnName, cbColumnName }; + struct SQLProcedureColumns_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, + ProcName, NameLength3, ColumnName, NameLength4 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szProcName %s," - " cbProcName %d, szColumnName %s, cbColumnName %d)\n", hstmt, - debugstr_an((const char *)szCatalogName, cbCatalogName), cbCatalogName, - debugstr_an((const char *)szSchemaName, cbSchemaName), cbSchemaName, - debugstr_an((const char *)szProcName, cbProcName), cbProcName, - debugstr_an((const char *)szColumnName, cbColumnName), cbColumnName); + TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, ProcName %s," + " NameLength3 %d, ColumnName %s, NameLength4 %d)\n", StatementHandle, + debugstr_an((const char *)CatalogName, NameLength1), NameLength1, + debugstr_an((const char *)SchemaName, NameLength2), NameLength2, + debugstr_an((const char *)ProcName, NameLength3), NameLength3, + debugstr_an((const char *)ColumnName, NameLength4), NameLength4); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLProcedureColumns, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1644,20 +2052,24 @@ SQLRETURN WINAPI SQLProcedureColumns(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQL /************************************************************************* * SQLProcedures [ODBC32.067] */ -SQLRETURN WINAPI SQLProcedures(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, - SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szProcName, - SQLSMALLINT cbProcName) +SQLRETURN WINAPI SQLProcedures(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, + SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *ProcName, + SQLSMALLINT NameLength3) { - struct SQLProcedures_params params = { hstmt, szCatalogName, cbCatalogName, szSchemaName, - cbSchemaName, szProcName, cbProcName }; + struct SQLProcedures_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, ProcName, + NameLength3 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szProcName %s," - " cbProcName %d)\n", hstmt, - debugstr_an((const char *)szCatalogName, cbCatalogName), cbCatalogName, - debugstr_an((const char *)szSchemaName, cbSchemaName), cbSchemaName, - debugstr_an((const char *)szProcName, cbProcName), cbProcName); + TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, ProcName %s," + " NameLength3 %d)\n", StatementHandle, + debugstr_an((const char *)CatalogName, NameLength1), NameLength1, + debugstr_an((const char *)SchemaName, NameLength2), NameLength2, + debugstr_an((const char *)ProcName, NameLength3), NameLength3); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLProcedures, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1666,14 +2078,21 @@ SQLRETURN WINAPI SQLProcedures(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLI /************************************************************************* * SQLSetPos [ODBC32.068] */ -SQLRETURN WINAPI SQLSetPos(SQLHSTMT hstmt, SQLSETPOSIROW irow, SQLUSMALLINT fOption, SQLUSMALLINT fLock) +SQLRETURN WINAPI SQLSetPos(SQLHSTMT StatementHandle, SQLSETPOSIROW RowNumber, SQLUSMALLINT Operation, + SQLUSMALLINT LockType) { - struct SQLSetPos_params params = { hstmt, irow, fOption, fLock }; + struct SQLSetPos_params params = { 0, RowNumber, Operation, LockType }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, irow %s, fOption %d, fLock %d)\n", hstmt, debugstr_sqlulen(irow), fOption, fLock); + TRACE("(StatementHandle %p, RowNumber %s, Operation %d, LockType %d)\n", StatementHandle, + debugstr_sqlulen(RowNumber), Operation, LockType); + + if (!handle) return SQL_INVALID_HANDLE;
- ret = ODBC_CALL( SQLSetPos, ¶ms ); + params.StatementHandle = handle->unix_handle; + if (SUCCESS(( ret = ODBC_CALL( SQLSetPos, ¶ms ))) && Operation == SQL_REFRESH) + update_result_lengths( handle ); TRACE("Returning %d\n", ret); return ret; } @@ -1681,20 +2100,24 @@ SQLRETURN WINAPI SQLSetPos(SQLHSTMT hstmt, SQLSETPOSIROW irow, SQLUSMALLINT fOpt /************************************************************************* * SQLTablePrivileges [ODBC32.070] */ -SQLRETURN WINAPI SQLTablePrivileges(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLSMALLINT cbCatalogName, - SQLCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLCHAR *szTableName, - SQLSMALLINT cbTableName) +SQLRETURN WINAPI SQLTablePrivileges(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSMALLINT NameLength1, + SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, + SQLSMALLINT NameLength3) { - struct SQLTablePrivileges_params params = { hstmt, szCatalogName, cbCatalogName, szSchemaName, - cbSchemaName, szTableName, cbTableName }; + struct SQLTablePrivileges_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, + TableName, NameLength3 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s," - " cbTableName %d)\n", hstmt, - debugstr_an((const char *)szCatalogName, cbCatalogName), cbCatalogName, - debugstr_an((const char *)szSchemaName, cbSchemaName), cbSchemaName, - debugstr_an((const char *)szTableName, cbTableName), cbTableName); + TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s," + "NameLength3 %d)\n", StatementHandle, + debugstr_an((const char *)CatalogName, NameLength1), NameLength1, + debugstr_an((const char *)SchemaName, NameLength2), NameLength2, + debugstr_an((const char *)TableName, NameLength3), NameLength3); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLTablePrivileges, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1703,22 +2126,26 @@ SQLRETURN WINAPI SQLTablePrivileges(SQLHSTMT hstmt, SQLCHAR *szCatalogName, SQLS /************************************************************************* * SQLDrivers [ODBC32.071] */ -SQLRETURN WINAPI SQLDrivers(SQLHENV EnvironmentHandle, SQLUSMALLINT fDirection, SQLCHAR *szDriverDesc, - SQLSMALLINT cbDriverDescMax, SQLSMALLINT *pcbDriverDesc, - SQLCHAR *szDriverAttributes, SQLSMALLINT cbDriverAttrMax, - SQLSMALLINT *pcbDriverAttr) +SQLRETURN WINAPI SQLDrivers(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLCHAR *DriverDescription, + SQLSMALLINT BufferLength1, SQLSMALLINT *DescriptionLength, + SQLCHAR *DriverAttributes, SQLSMALLINT BufferLength2, + SQLSMALLINT *AttributesLength) { - struct SQLDrivers_params params = { EnvironmentHandle, fDirection, szDriverDesc, cbDriverDescMax, - pcbDriverDesc, szDriverAttributes, cbDriverAttrMax, pcbDriverAttr }; + struct SQLDrivers_params params = { 0, Direction, DriverDescription, BufferLength1, DescriptionLength, + DriverAttributes, BufferLength2, AttributesLength }; + struct handle *handle = EnvironmentHandle; SQLRETURN ret;
- TRACE("(EnvironmentHandle %p, Direction %d, szDriverDesc %p, cbDriverDescMax %d, pcbDriverDesc %p," - " DriverAttributes %p, cbDriverAttrMax %d, pcbDriverAttr %p)\n", EnvironmentHandle, fDirection, - szDriverDesc, cbDriverDescMax, pcbDriverDesc, szDriverAttributes, cbDriverAttrMax, pcbDriverAttr); + TRACE("(EnvironmentHandle %p, Direction %d, DriverDescription %p, BufferLength1 %d, DescriptionLength %p," + " DriverAttributes %p, BufferLength2 %d, AttributesLength %p)\n", EnvironmentHandle, Direction, + DriverDescription, BufferLength1, DescriptionLength, DriverAttributes, BufferLength2, AttributesLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.EnvironmentHandle = handle->unix_handle; ret = ODBC_CALL( SQLDrivers, ¶ms );
- if (ret == SQL_NO_DATA && fDirection == SQL_FETCH_FIRST) + if (ret == SQL_NO_DATA && Direction == SQL_FETCH_FIRST) ERR_(winediag)("No ODBC drivers could be found. Check the settings for your libodbc provider.\n");
TRACE("Returning %d\n", ret); @@ -1728,20 +2155,33 @@ SQLRETURN WINAPI SQLDrivers(SQLHENV EnvironmentHandle, SQLUSMALLINT fDirection, /************************************************************************* * SQLBindParameter [ODBC32.072] */ -SQLRETURN WINAPI SQLBindParameter(SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT fParamType, - SQLSMALLINT fCType, SQLSMALLINT fSqlType, SQLULEN cbColDef, - SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLLEN cbValueMax, - SQLLEN *pcbValue) +SQLRETURN WINAPI SQLBindParameter(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNumber, SQLSMALLINT InputOutputType, + SQLSMALLINT ValueType, SQLSMALLINT ParameterType, SQLULEN ColumnSize, + SQLSMALLINT DecimalDigits, SQLPOINTER ParameterValue, SQLLEN BufferLength, + SQLLEN *StrLen_or_Ind) { - struct SQLBindParameter_params params = { hstmt, ipar, fParamType, fCType, fSqlType, cbColDef, - ibScale, rgbValue, cbValueMax, pcbValue }; + struct SQLBindParameter_params params = { 0, ParameterNumber, InputOutputType, ValueType, ParameterType, + ColumnSize, DecimalDigits, ParameterValue, BufferLength }; + struct handle *handle = StatementHandle; + UINT i = ParameterNumber - 1; SQLRETURN ret;
- TRACE("(hstmt %p, ipar %d, fParamType %d, fCType %d, fSqlType %d, cbColDef %s, ibScale %d, rgbValue %p," - " cbValueMax %s, pcbValue %p)\n", hstmt, ipar, fParamType, fCType, fSqlType, debugstr_sqlulen(cbColDef), - ibScale, rgbValue, debugstr_sqllen(cbValueMax), pcbValue); + TRACE("(StatementHandle %p, ParameterNumber %d, InputOutputType %d, ValueType %d, ParameterType %d, " + "ColumnSize %s, DecimalDigits %d, ParameterValue, %p, BufferLength %s, StrLen_or_Ind %p)\n", + StatementHandle, ParameterNumber, InputOutputType, ValueType, ParameterType, debugstr_sqlulen(ColumnSize), + DecimalDigits, ParameterValue, debugstr_sqllen(BufferLength), StrLen_or_Ind); + + if (!handle) return SQL_INVALID_HANDLE; + if (!ParameterNumber) + { + FIXME( "parameter 0 not handled\n" ); + return SQL_ERROR; + } + if (!resize_binding( &handle->bind_parameter, ParameterNumber )) return SQL_ERROR;
- ret = ODBC_CALL( SQLBindParameter, ¶ms ); + params.StatementHandle = handle->unix_handle; + params.StrLen_or_Ind = &handle->bind_parameter.param[i].len; + if (SUCCESS((ret = ODBC_CALL( SQLBindParameter, ¶ms )))) handle->bind_parameter.param[i].ptr = StrLen_or_Ind; TRACE("Returning %d\n", ret); return ret; } @@ -1749,19 +2189,23 @@ SQLRETURN WINAPI SQLBindParameter(SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT /************************************************************************* * SQLDriverConnect [ODBC32.041] */ -SQLRETURN WINAPI SQLDriverConnect(SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR *ConnectionString, SQLSMALLINT Length, - SQLCHAR *conn_str_out, SQLSMALLINT conn_str_out_max, - SQLSMALLINT *ptr_conn_str_out, SQLUSMALLINT driver_completion) +SQLRETURN WINAPI SQLDriverConnect(SQLHDBC ConnectionHandle, SQLHWND WindowHandle, SQLCHAR *ConnectionString, + SQLSMALLINT Length, SQLCHAR *OutConnectionString, SQLSMALLINT BufferLength, + SQLSMALLINT *Length2, SQLUSMALLINT DriverCompletion) { - struct SQLDriverConnect_params params = { hdbc, hwnd, ConnectionString, Length, conn_str_out, - conn_str_out_max, ptr_conn_str_out, driver_completion }; + struct SQLDriverConnect_params params = { 0, WindowHandle, ConnectionString, Length, OutConnectionString, + BufferLength, Length2, DriverCompletion }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
- TRACE("(hdbc %p, hwnd %p, ConnectionString %s, Length %d, conn_str_out %p, conn_str_out_max %d," - " ptr_conn_str_out %p, driver_completion %d)\n", hdbc, hwnd, - debugstr_an((const char *)ConnectionString, Length), Length, conn_str_out, conn_str_out_max, - ptr_conn_str_out, driver_completion); + TRACE("(ConnectionHandle %p, hwnd %p, ConnectionString %s, Length %d, conn_str_out %p, conn_str_out_max %d," + " ptr_conn_str_out %p, driver_completion %d)\n", ConnectionHandle, WindowHandle, + debugstr_an((const char *)ConnectionString, Length), Length, OutConnectionString, BufferLength, + Length2, DriverCompletion); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLDriverConnect, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1770,15 +2214,19 @@ SQLRETURN WINAPI SQLDriverConnect(SQLHDBC hdbc, SQLHWND hwnd, SQLCHAR *Connectio /************************************************************************* * SQLSetScrollOptions [ODBC32.069] */ -SQLRETURN WINAPI SQLSetScrollOptions(SQLHSTMT statement_handle, SQLUSMALLINT f_concurrency, SQLLEN crow_keyset, - SQLUSMALLINT crow_rowset) +SQLRETURN WINAPI SQLSetScrollOptions(SQLHSTMT StatementHandle, SQLUSMALLINT Concurrency, SQLLEN KeySetSize, + SQLUSMALLINT RowSetSize) { - struct SQLSetScrollOptions_params params = { statement_handle, f_concurrency, crow_keyset, crow_rowset }; + struct SQLSetScrollOptions_params params = { 0, Concurrency, KeySetSize, RowSetSize }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(statement_handle %p, f_concurrency %d, crow_keyset %s, crow_rowset %d)\n", statement_handle, - f_concurrency, debugstr_sqllen(crow_keyset), crow_rowset); + TRACE("(StatementHandle %p, Concurrency %d, KeySetSize %s, RowSetSize %d)\n", StatementHandle, + Concurrency, debugstr_sqllen(KeySetSize), RowSetSize);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetScrollOptions, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1817,23 +2265,31 @@ static BOOL SQLColAttributes_KnownStringAttribute(SQLUSMALLINT fDescType) /************************************************************************* * SQLColAttributesW [ODBC32.106] */ -SQLRETURN WINAPI SQLColAttributesW(SQLHSTMT hstmt, SQLUSMALLINT icol, SQLUSMALLINT fDescType, - SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT *pcbDesc, - SQLLEN *pfDesc) +SQLRETURN WINAPI SQLColAttributesW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, + SQLPOINTER CharacterAttributes, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, + SQLLEN *NumericAttributes) { - struct SQLColAttributesW_params params = { hstmt, icol, fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc }; + struct SQLColAttributesW_params params = { 0, ColumnNumber, FieldIdentifier, CharacterAttributes, BufferLength, + StringLength }; + struct handle *handle = StatementHandle; + INT64 attrs; SQLRETURN ret;
- TRACE("(hstmt %p, icol %d, fDescType %d, rgbDesc %p, cbDescMax %d, pcbDesc %p, pfDesc %p)\n", hstmt, icol, - fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc); + TRACE("(StatementHandle %p, ColumnNumber %d, FieldIdentifier %d, CharacterAttributes %p, BufferLength %d, " + "StringLength %p, NumericAttributes %p)\n", StatementHandle, ColumnNumber, FieldIdentifier, + CharacterAttributes, BufferLength, StringLength, NumericAttributes); + + if (!handle) return SQL_INVALID_HANDLE;
- ret = ODBC_CALL( SQLColAttributesW, ¶ms ); + params.StatementHandle = handle->unix_handle; + params.NumericAttributes = &attrs; + if (SUCCESS((ret = ODBC_CALL( SQLColAttributesW, ¶ms )))) *NumericAttributes = attrs;
- if (ret == SQL_SUCCESS && SQLColAttributes_KnownStringAttribute(fDescType) && rgbDesc && pcbDesc && - *pcbDesc != lstrlenW(rgbDesc) * 2) + if (ret == SQL_SUCCESS && SQLColAttributes_KnownStringAttribute(FieldIdentifier) && CharacterAttributes && + StringLength && *StringLength != wcslen(CharacterAttributes) * 2) { TRACE("CHEAT: resetting name length for ADO\n"); - *pcbDesc = lstrlenW(rgbDesc) * 2; + *StringLength = wcslen(CharacterAttributes) * 2; }
TRACE("Returning %d\n", ret); @@ -1847,14 +2303,18 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, WCHAR *ServerName, SQLSMA WCHAR *UserName, SQLSMALLINT NameLength2, WCHAR *Authentication, SQLSMALLINT NameLength3) { - struct SQLConnectW_params params = { ConnectionHandle, ServerName, NameLength1, UserName, NameLength2, - Authentication, NameLength3 }; + struct SQLConnectW_params params = { 0, ServerName, NameLength1, UserName, NameLength2, Authentication, + NameLength3 }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, ServerName %s, NameLength1 %d, UserName %s, NameLength2 %d, Authentication %s," " NameLength3 %d)\n", ConnectionHandle, debugstr_wn(ServerName, NameLength1), NameLength1, debugstr_wn(UserName, NameLength2), NameLength2, debugstr_wn(Authentication, NameLength3), NameLength3);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLConnectW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1867,23 +2327,31 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, SQLSMALLINT *DataType, SQLULEN *ColumnSize, SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable) { - struct SQLDescribeColW_params params = { StatementHandle, ColumnNumber, ColumnName, BufferLength, - NameLength, DataType, ColumnSize, DecimalDigits, Nullable }; + struct SQLDescribeColW_params params = { 0, ColumnNumber, ColumnName, BufferLength, NameLength, DataType, + NULL, DecimalDigits, Nullable }; + struct handle *handle = StatementHandle; SQLSMALLINT dummy; + UINT64 size; SQLRETURN ret;
TRACE("(StatementHandle %p, ColumnNumber %d, ColumnName %p, BufferLength %d, NameLength %p, DataType %p," " ColumnSize %p, DecimalDigits %p, Nullable %p)\n", StatementHandle, ColumnNumber, ColumnName, BufferLength, NameLength, DataType, ColumnSize, DecimalDigits, Nullable);
- if (!NameLength) NameLength = &dummy; /* workaround for drivers that don't accept NULL NameLength */ + if (!handle) return SQL_INVALID_HANDLE;
- ret = ODBC_CALL( SQLDescribeColW, ¶ms ); - if (ret >= 0) + params.StatementHandle = handle->unix_handle; + if (!NameLength) params.NameLength = &dummy; /* workaround for drivers that don't accept NULL NameLength */ + params.ColumnSize = &size; + if (SUCCESS((ret = ODBC_CALL( SQLDescribeColW, ¶ms )))) { if (ColumnName && NameLength) TRACE("ColumnName %s\n", debugstr_wn(ColumnName, *NameLength)); if (DataType) TRACE("DataType %d\n", *DataType); - if (ColumnSize) TRACE("ColumnSize %s\n", debugstr_sqlulen(*ColumnSize)); + if (ColumnSize) + { + *ColumnSize = size; + TRACE("ColumnSize %s\n", debugstr_sqlulen(*ColumnSize)); + } if (DecimalDigits) TRACE("DecimalDigits %d\n", *DecimalDigits); if (Nullable) TRACE("Nullable %d\n", *Nullable); } @@ -1896,22 +2364,23 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu * SQLErrorW [ODBC32.110] */ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle, - WCHAR *Sqlstate, SQLINTEGER *NativeError, WCHAR *MessageText, + WCHAR *SqlState, SQLINTEGER *NativeError, WCHAR *MessageText, SQLSMALLINT BufferLength, SQLSMALLINT *TextLength) { - struct SQLErrorW_params params = { EnvironmentHandle, ConnectionHandle, StatementHandle, Sqlstate, - NativeError, MessageText, BufferLength, TextLength }; + struct SQLErrorW_params params = { 0, 0, 0, SqlState, NativeError, MessageText, BufferLength, TextLength }; + struct handle *env = EnvironmentHandle, *con = ConnectionHandle, *stmt = StatementHandle; SQLRETURN ret;
- TRACE("(EnvironmentHandle %p, ConnectionHandle %p, StatementHandle %p, Sqlstate %p, NativeError %p," + TRACE("(EnvironmentHandle %p, ConnectionHandle %p, StatementHandle %p, SqlState %p, NativeError %p," " MessageText %p, BufferLength %d, TextLength %p)\n", EnvironmentHandle, ConnectionHandle, - StatementHandle, Sqlstate, NativeError, MessageText, BufferLength, TextLength); - - ret = ODBC_CALL( SQLErrorW, ¶ms ); + StatementHandle, SqlState, NativeError, MessageText, BufferLength, TextLength);
- if (ret == SQL_SUCCESS) + if (env) params.EnvironmentHandle = env->unix_handle; + if (con) params.ConnectionHandle = con->unix_handle; + if (stmt) params.StatementHandle = stmt->unix_handle; + if (SUCCESS((ret = ODBC_CALL( SQLErrorW, ¶ms )))) { - TRACE(" SQLState %s\n", debugstr_wn(Sqlstate, 5)); + TRACE(" SqlState %s\n", debugstr_wn(SqlState, 5)); TRACE(" Error %d\n", *NativeError); TRACE(" MessageText %s\n", debugstr_wn(MessageText, *TextLength)); } @@ -1925,12 +2394,16 @@ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, */ SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLINTEGER TextLength) { - struct SQLExecDirectW_params params = { StatementHandle, StatementText, TextLength }; + struct SQLExecDirectW_params params = { 0, StatementText, TextLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, StatementText %s, TextLength %d)\n", StatementHandle, debugstr_wn(StatementText, TextLength), TextLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLExecDirectW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1942,12 +2415,16 @@ SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength) { - struct SQLGetCursorNameW_params params = { StatementHandle, CursorName, BufferLength, NameLength }; + struct SQLGetCursorNameW_params params = { 0, CursorName, BufferLength, NameLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, CursorName %p, BufferLength %d, NameLength %p)\n", StatementHandle, CursorName, BufferLength, NameLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetCursorNameW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1958,12 +2435,16 @@ SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, */ SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLINTEGER TextLength) { - struct SQLPrepareW_params params = { StatementHandle, StatementText, TextLength }; + struct SQLPrepareW_params params = { 0, StatementText, TextLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, StatementText %s, TextLength %d)\n", StatementHandle, debugstr_wn(StatementText, TextLength), TextLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLPrepareW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1974,12 +2455,16 @@ SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQL */ SQLRETURN WINAPI SQLSetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, SQLSMALLINT NameLength) { - struct SQLSetCursorNameW_params params = { StatementHandle, CursorName, NameLength }; + struct SQLSetCursorNameW_params params = { 0, CursorName, NameLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, CursorName %s, NameLength %d)\n", StatementHandle, debugstr_wn(CursorName, NameLength), NameLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetCursorNameW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -1993,22 +2478,27 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLLEN *NumericAttribute) { - struct SQLColAttributeW_params params = { StatementHandle, ColumnNumber, FieldIdentifier, - CharacterAttribute, BufferLength, StringLength, - NumericAttribute }; + struct SQLColAttributeW_params params = { 0, ColumnNumber, FieldIdentifier, CharacterAttribute, BufferLength, + StringLength }; + struct handle *handle = StatementHandle; + INT64 attr; SQLRETURN ret;
TRACE("StatementHandle %p ColumnNumber %d FieldIdentifier %d CharacterAttribute %p BufferLength %d" " StringLength %p NumericAttribute %p\n", StatementHandle, ColumnNumber, FieldIdentifier, CharacterAttribute, BufferLength, StringLength, NumericAttribute);
- ret = ODBC_CALL( SQLColAttributeW, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; + params.NumericAttribute = &attr; + if (SUCCESS((ret = ODBC_CALL( SQLColAttributeW, ¶ms )))) *NumericAttribute = attr;
if (ret == SQL_SUCCESS && CharacterAttribute != NULL && SQLColAttributes_KnownStringAttribute(FieldIdentifier) && - StringLength && *StringLength != lstrlenW(CharacterAttribute) * 2) + StringLength && *StringLength != wcslen(CharacterAttribute) * 2) { TRACE("CHEAT: resetting name length for ADO\n"); - *StringLength = lstrlenW(CharacterAttribute) * 2; + *StringLength = wcslen(CharacterAttribute) * 2; }
TRACE("Returning %d\n", ret); @@ -2021,13 +2511,16 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { - struct SQLGetConnectAttrW_params params = { ConnectionHandle, Attribute, Value, - BufferLength, StringLength }; + struct SQLGetConnectAttrW_params params = { 0, Attribute, Value, BufferLength, StringLength }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, Attribute %d, Value %p, BufferLength %d, StringLength %p)\n", ConnectionHandle, Attribute, Value, BufferLength, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetConnectAttrW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2039,13 +2532,16 @@ SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu SQLRETURN WINAPI SQLGetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { - struct SQLGetDescFieldW_params params = { DescriptorHandle, RecNumber, FieldIdentifier, Value, - BufferLength, StringLength }; + struct SQLGetDescFieldW_params params = { 0, RecNumber, FieldIdentifier, Value, BufferLength, StringLength }; + struct handle *handle = DescriptorHandle; SQLRETURN ret;
TRACE("(DescriptorHandle %p, RecNumber %d, FieldIdentifier %d, Value %p, BufferLength %d, StringLength %p)\n", DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.DescriptorHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetDescFieldW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2059,15 +2555,21 @@ SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision, SQLSMALLINT *Scale, SQLSMALLINT *Nullable) { - struct SQLGetDescRecW_params params = { DescriptorHandle, RecNumber, Name, BufferLength, StringLength, - Type, SubType, Length, Precision, Scale, Nullable }; + struct SQLGetDescRecW_params params = { 0, RecNumber, Name, BufferLength, StringLength, Type, SubType, + NULL, Precision, Scale, Nullable }; + struct handle *handle = DescriptorHandle; + INT64 len; SQLRETURN ret;
TRACE("(DescriptorHandle %p, RecNumber %d, Name %p, BufferLength %d, StringLength %p, Type %p, SubType %p," " Length %p, Precision %p, Scale %p, Nullable %p)\n", DescriptorHandle, RecNumber, Name, BufferLength, StringLength, Type, SubType, Length, Precision, Scale, Nullable);
- ret = ODBC_CALL( SQLGetDescRecW, ¶ms ); + if (!handle) return SQL_INVALID_HANDLE; + + params.DescriptorHandle = handle->unix_handle; + params.Length = &len; + if (SUCCESS((ret = ODBC_CALL( SQLGetDescRecW, ¶ms )))) *Length = len; TRACE("Returning %d\n", ret); return ret; } @@ -2079,13 +2581,17 @@ SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLS SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { - struct SQLGetDiagFieldW_params params = { HandleType, Handle, RecNumber, DiagIdentifier, DiagInfo, - BufferLength, StringLength }; + struct SQLGetDiagFieldW_params params = { HandleType, 0, RecNumber, DiagIdentifier, DiagInfo, BufferLength, + StringLength }; + struct handle *handle = Handle; SQLRETURN ret;
TRACE("(HandleType %d, Handle %p, RecNumber %d, DiagIdentifier %d, DiagInfo %p, BufferLength %d," " StringLength %p)\n", HandleType, Handle, RecNumber, DiagIdentifier, DiagInfo, BufferLength, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.Handle = handle->unix_handle; ret = ODBC_CALL( SQLGetDiagFieldW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2094,18 +2600,22 @@ SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLS /************************************************************************* * SQLGetDiagRecW [ODBC32.136] */ -SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, - WCHAR *Sqlstate, SQLINTEGER *NativeError, WCHAR *MessageText, - SQLSMALLINT BufferLength, SQLSMALLINT *TextLength) +SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, WCHAR *SqlState, + SQLINTEGER *NativeError, WCHAR *MessageText, SQLSMALLINT BufferLength, + SQLSMALLINT *TextLength) { - struct SQLGetDiagRecW_params params = { HandleType, Handle, RecNumber, Sqlstate, NativeError, - MessageText, BufferLength, TextLength }; + struct SQLGetDiagRecW_params params = { HandleType, 0, RecNumber, SqlState, NativeError, MessageText, + BufferLength, TextLength }; + struct handle *handle = Handle; SQLRETURN ret;
- TRACE("(HandleType %d, Handle %p, RecNumber %d, Sqlstate %p, NativeError %p, MessageText %p, BufferLength %d," - " TextLength %p)\n", HandleType, Handle, RecNumber, Sqlstate, NativeError, MessageText, BufferLength, + TRACE("(HandleType %d, Handle %p, RecNumber %d, SqlState %p, NativeError %p, MessageText %p, BufferLength %d," + " TextLength %p)\n", HandleType, Handle, RecNumber, SqlState, NativeError, MessageText, BufferLength, TextLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.Handle = handle->unix_handle; ret = ODBC_CALL( SQLGetDiagRecW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2117,7 +2627,8 @@ SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { - struct SQLGetStmtAttrW_params params = { StatementHandle, Attribute, Value, BufferLength, StringLength }; + struct SQLGetStmtAttrW_params params = { 0, Attribute, Value, BufferLength, StringLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, Attribute %d, Value %p, BufferLength %d, StringLength %p)\n", StatementHandle, @@ -2129,6 +2640,9 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, return SQL_ERROR; }
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetStmtAttrW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2140,12 +2654,16 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { - struct SQLSetConnectAttrW_params params = { ConnectionHandle, Attribute, Value, StringLength }; + struct SQLSetConnectAttrW_params params = { 0, Attribute, Value, StringLength }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
- TRACE("(ConnectionHandle %p, Attribute %d, Value %p, StringLength %d)\n", ConnectionHandle, Attribute, Value, - StringLength); + TRACE("(ConnectionHandle %p, Attribute %d, Value %p, StringLength %d)\n", ConnectionHandle, Attribute, + Value, StringLength); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetConnectAttrW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2158,8 +2676,9 @@ SQLRETURN WINAPI SQLColumnsW(SQLHSTMT StatementHandle, WCHAR *CatalogName, SQLSM WCHAR *SchemaName, SQLSMALLINT NameLength2, WCHAR *TableName, SQLSMALLINT NameLength3, WCHAR *ColumnName, SQLSMALLINT NameLength4) { - struct SQLColumnsW_params params = { StatementHandle, CatalogName, NameLength1, SchemaName, - NameLength2, TableName, NameLength3, ColumnName, NameLength4 }; + struct SQLColumnsW_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, TableName, + NameLength3, ColumnName, NameLength4 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s," @@ -2167,6 +2686,9 @@ SQLRETURN WINAPI SQLColumnsW(SQLHSTMT StatementHandle, WCHAR *CatalogName, SQLSM debugstr_wn(CatalogName, NameLength1), NameLength1, debugstr_wn(SchemaName, NameLength2), NameLength2, debugstr_wn(TableName, NameLength3), NameLength3, debugstr_wn(ColumnName, NameLength4), NameLength4);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLColumnsW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2179,8 +2701,9 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl SQLSMALLINT Length, WCHAR *OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT *Length2, SQLUSMALLINT DriverCompletion) { - struct SQLDriverConnectW_params params = { ConnectionHandle, WindowHandle, InConnectionString, Length, - OutConnectionString, BufferLength, Length2, DriverCompletion }; + struct SQLDriverConnectW_params params = { 0, WindowHandle, InConnectionString, Length, OutConnectionString, + BufferLength, Length2, DriverCompletion }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, WindowHandle %p, InConnectionString %s, Length %d, OutConnectionString %p," @@ -2188,6 +2711,9 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl debugstr_wn(InConnectionString, Length), Length, OutConnectionString, BufferLength, Length2, DriverCompletion);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLDriverConnectW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2198,11 +2724,15 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl */ SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value) { - struct SQLGetConnectOptionW_params params = { ConnectionHandle, Option, Value }; + struct SQLGetConnectOptionW_params params = { 0, Option, Value }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, Option %d, Value %p)\n", ConnectionHandle, Option, Value);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetConnectOptionW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2214,12 +2744,16 @@ SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Opt SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { - struct SQLGetInfoW_params params = { ConnectionHandle, InfoType, InfoValue, BufferLength, StringLength }; + struct SQLGetInfoW_params params = { 0, InfoType, InfoValue, BufferLength, StringLength }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle, %p, InfoType %d, InfoValue %p, BufferLength %d, StringLength %p)\n", ConnectionHandle, InfoType, InfoValue, BufferLength, StringLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetInfoW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2230,11 +2764,15 @@ SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQ */ SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType) { - struct SQLGetTypeInfoW_params params = { StatementHandle, DataType }; + struct SQLGetTypeInfoW_params params = { 0, DataType }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, DataType %d)\n", StatementHandle, DataType);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLGetTypeInfoW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2245,11 +2783,15 @@ SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType) */ SQLRETURN WINAPI SQLSetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLLEN Value) { - struct SQLSetConnectOptionW_params params = { ConnectionHandle, Option, Value }; + struct SQLSetConnectOptionW_params params = { 0, Option, Value }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
TRACE("(ConnectionHandle %p, Option %d, Value %s)\n", ConnectionHandle, Option, debugstr_sqllen(Value));
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetConnectOptionW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2263,8 +2805,9 @@ SQLRETURN WINAPI SQLSpecialColumnsW(SQLHSTMT StatementHandle, SQLUSMALLINT Ident SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SQLUSMALLINT Nullable) { - struct SQLSpecialColumnsW_params params = { StatementHandle, IdentifierType, CatalogName, NameLength1, - SchemaName, NameLength2, TableName, NameLength3, Scope, Nullable }; + struct SQLSpecialColumnsW_params params = { 0, IdentifierType, CatalogName, NameLength1, SchemaName, NameLength2, + TableName, NameLength3, Scope, Nullable }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, IdentifierType %d, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d," @@ -2272,6 +2815,9 @@ SQLRETURN WINAPI SQLSpecialColumnsW(SQLHSTMT StatementHandle, SQLUSMALLINT Ident debugstr_wn(CatalogName, NameLength1), NameLength1, debugstr_wn(SchemaName, NameLength2), NameLength2, debugstr_wn(TableName, NameLength3), NameLength3, Scope, Nullable);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLSpecialColumnsW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2284,8 +2830,9 @@ SQLRETURN WINAPI SQLStatisticsW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved) { - struct SQLStatisticsW_params params = { StatementHandle, CatalogName, NameLength1, SchemaName, - NameLength2, TableName, NameLength3, Unique, Reserved }; + struct SQLStatisticsW_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, TableName, + NameLength3, Unique, Reserved }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d SchemaName %s, NameLength2 %d, TableName %s" @@ -2293,6 +2840,9 @@ SQLRETURN WINAPI SQLStatisticsW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, debugstr_wn(CatalogName, NameLength1), NameLength1, debugstr_wn(SchemaName, NameLength2), NameLength2, debugstr_wn(TableName, NameLength3), NameLength3, Unique, Reserved);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLStatisticsW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2305,8 +2855,9 @@ SQLRETURN WINAPI SQLTablesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQL SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLWCHAR *TableType, SQLSMALLINT NameLength4) { - struct SQLTablesW_params params = { StatementHandle, CatalogName, NameLength1, SchemaName, NameLength2, - TableName, NameLength3, TableType, NameLength4 }; + struct SQLTablesW_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, TableName, + NameLength3, TableType, NameLength4 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s," @@ -2314,6 +2865,9 @@ SQLRETURN WINAPI SQLTablesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQL debugstr_wn(CatalogName, NameLength1), NameLength1, debugstr_wn(SchemaName, NameLength2), NameLength2, debugstr_wn(TableName, NameLength3), NameLength3, debugstr_wn(TableType, NameLength4), NameLength4);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLTablesW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2322,17 +2876,21 @@ SQLRETURN WINAPI SQLTablesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQL /************************************************************************* * SQLBrowseConnectW [ODBC32.155] */ -SQLRETURN WINAPI SQLBrowseConnectW(SQLHDBC hdbc, SQLWCHAR *szConnStrIn, SQLSMALLINT cbConnStrIn, - SQLWCHAR *szConnStrOut, SQLSMALLINT cbConnStrOutMax, - SQLSMALLINT *pcbConnStrOut) +SQLRETURN WINAPI SQLBrowseConnectW(SQLHDBC ConnectionHandle, SQLWCHAR *InConnectionString, SQLSMALLINT StringLength1, + SQLWCHAR *OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength2) { - struct SQLBrowseConnectW_params params = { hdbc, szConnStrIn, cbConnStrIn, szConnStrOut, - cbConnStrOutMax, pcbConnStrOut }; + struct SQLBrowseConnectW_params params = { 0, InConnectionString, StringLength1, OutConnectionString, + BufferLength, StringLength2 }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
- TRACE("(hdbc %p, szConnStrIn %s, cbConnStrIn %d, szConnStrOut %p, cbConnStrOutMax %d, pcbConnStrOut %p)\n", - hdbc, debugstr_wn(szConnStrIn, cbConnStrIn), cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut); + TRACE("(ConnectionHandle %p, InConnectionString %s, StringLength1 %d, OutConnectionString %p, BufferLength %d, " + "StringLength2 %p)\n", ConnectionHandle, debugstr_wn(InConnectionString, StringLength1), StringLength1, + OutConnectionString, BufferLength, StringLength2);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLBrowseConnectW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2341,22 +2899,25 @@ SQLRETURN WINAPI SQLBrowseConnectW(SQLHDBC hdbc, SQLWCHAR *szConnStrIn, SQLSMALL /************************************************************************* * SQLColumnPrivilegesW [ODBC32.156] */ -SQLRETURN WINAPI SQLColumnPrivilegesW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, - SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, - SQLSMALLINT cbTableName, SQLWCHAR *szColumnName, SQLSMALLINT cbColumnName) +SQLRETURN WINAPI SQLColumnPrivilegesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQLSMALLINT NameLength1, + SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *TableName, + SQLSMALLINT NameLength3, SQLWCHAR *ColumnName, SQLSMALLINT NameLength4) { - struct SQLColumnPrivilegesW_params params = { hstmt, szCatalogName, cbCatalogName, szSchemaName, - cbSchemaName, szTableName, cbTableName, szColumnName, - cbColumnName }; + struct SQLColumnPrivilegesW_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, + TableName, NameLength3, ColumnName, NameLength4 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s," - " cbTableName %d, szColumnName %s, cbColumnName %d)\n", hstmt, - debugstr_wn(szCatalogName, cbCatalogName), cbCatalogName, - debugstr_wn(szSchemaName, cbSchemaName), cbSchemaName, - debugstr_wn(szTableName, cbTableName), cbTableName, - debugstr_wn(szColumnName, cbColumnName), cbColumnName); + TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s," + " NameLength3 %d, ColumnName %s, NameLength3 %d)\n", StatementHandle, + debugstr_wn(CatalogName, NameLength1), NameLength1, + debugstr_wn(SchemaName, NameLength2), NameLength2, + debugstr_wn(TableName, NameLength3), NameLength3, + debugstr_wn(ColumnName, NameLength4), NameLength4); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLColumnPrivilegesW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2369,14 +2930,18 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, WCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2) { - struct SQLDataSourcesW_params params = { EnvironmentHandle, Direction, ServerName, BufferLength1, - NameLength1, Description, BufferLength2, NameLength2 }; + struct SQLDataSourcesW_params params = { 0, Direction, ServerName, BufferLength1, NameLength1, Description, + BufferLength2, NameLength2 }; + struct handle *handle = EnvironmentHandle; SQLRETURN ret;
TRACE("(EnvironmentHandle %p, Direction %d, ServerName %p, BufferLength1 %d, NameLength1 %p, Description %p," " BufferLength2 %d, NameLength2 %p)\n", EnvironmentHandle, Direction, ServerName, BufferLength1, NameLength1, Description, BufferLength2, NameLength2);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.EnvironmentHandle = handle->unix_handle; ret = ODBC_CALL( SQLDataSourcesW, ¶ms );
if (ret >= 0 && TRACE_ON(odbc)) @@ -2395,28 +2960,31 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi /************************************************************************* * SQLForeignKeysW [ODBC32.160] */ -SQLRETURN WINAPI SQLForeignKeysW(SQLHSTMT hstmt, SQLWCHAR *szPkCatalogName, SQLSMALLINT cbPkCatalogName, - SQLWCHAR *szPkSchemaName, SQLSMALLINT cbPkSchemaName, SQLWCHAR *szPkTableName, - SQLSMALLINT cbPkTableName, SQLWCHAR *szFkCatalogName, - SQLSMALLINT cbFkCatalogName, SQLWCHAR *szFkSchemaName, - SQLSMALLINT cbFkSchemaName, SQLWCHAR *szFkTableName, SQLSMALLINT cbFkTableName) +SQLRETURN WINAPI SQLForeignKeysW(SQLHSTMT StatementHandle, SQLWCHAR *PkCatalogName, SQLSMALLINT NameLength1, + SQLWCHAR *PkSchemaName, SQLSMALLINT NameLength2, SQLWCHAR *PkTableName, + SQLSMALLINT NameLength3, SQLWCHAR *FkCatalogName, SQLSMALLINT NameLength4, + SQLWCHAR *FkSchemaName, SQLSMALLINT NameLength5, SQLWCHAR *FkTableName, + SQLSMALLINT NameLength6) { - struct SQLForeignKeysW_params params = { hstmt, szPkCatalogName, cbPkCatalogName, szPkSchemaName, - cbPkSchemaName, szPkTableName, cbPkTableName, szFkCatalogName, - cbFkCatalogName, szFkSchemaName, cbFkSchemaName, szFkTableName, - cbFkTableName }; + struct SQLForeignKeysW_params params = { 0, PkCatalogName, NameLength1, PkSchemaName, NameLength2, + PkTableName, NameLength2, FkCatalogName, NameLength3, + FkSchemaName, NameLength5, FkTableName, NameLength6 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szPkCatalogName %s, cbPkCatalogName %d, szPkSchemaName %s, cbPkSchemaName %d," - " szPkTableName %s, cbPkTableName %d, szFkCatalogName %s, cbFkCatalogName %d, szFkSchemaName %s," - " cbFkSchemaName %d, szFkTableName %s, cbFkTableName %d)\n", hstmt, - debugstr_wn(szPkCatalogName, cbPkCatalogName), cbPkCatalogName, - debugstr_wn(szPkSchemaName, cbPkSchemaName), cbPkSchemaName, - debugstr_wn(szPkTableName, cbPkTableName), cbPkTableName, - debugstr_wn(szFkCatalogName, cbFkCatalogName), cbFkCatalogName, - debugstr_wn(szFkSchemaName, cbFkSchemaName), cbFkSchemaName, - debugstr_wn(szFkTableName, cbFkTableName), cbFkTableName); + TRACE("(StatementHandle %p, PkCatalogName %s, NameLength1 %d, PkSchemaName %s, NameLength2 %d," + " PkTableName %s, NameLength3 %d, FkCatalogName %s, NameLength4 %d, FkSchemaName %s," + " NameLength5 %d, FkTableName %s, NameLength6 %d)\n", StatementHandle, + debugstr_wn(PkCatalogName, NameLength1), NameLength1, + debugstr_wn(PkSchemaName, NameLength2), NameLength2, + debugstr_wn(PkTableName, NameLength3), NameLength3, + debugstr_wn(FkCatalogName, NameLength4), NameLength4, + debugstr_wn(FkSchemaName, NameLength5), NameLength5, + debugstr_wn(FkTableName, NameLength6), NameLength6); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLForeignKeysW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2425,15 +2993,21 @@ SQLRETURN WINAPI SQLForeignKeysW(SQLHSTMT hstmt, SQLWCHAR *szPkCatalogName, SQLS /************************************************************************* * SQLNativeSqlW [ODBC32.162] */ -SQLRETURN WINAPI SQLNativeSqlW(SQLHDBC hdbc, SQLWCHAR *szSqlStrIn, SQLINTEGER cbSqlStrIn, SQLWCHAR *szSqlStr, - SQLINTEGER cbSqlStrMax, SQLINTEGER *pcbSqlStr) +SQLRETURN WINAPI SQLNativeSqlW(SQLHDBC ConnectionHandle, SQLWCHAR *InStatementText, SQLINTEGER TextLength1, + SQLWCHAR *OutStatementText, SQLINTEGER BufferLength, SQLINTEGER *TextLength2) { - struct SQLNativeSqlW_params params = { hdbc, szSqlStrIn, cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr }; + struct SQLNativeSqlW_params params = { 0, InStatementText, TextLength1, OutStatementText, BufferLength, + TextLength2 }; + struct handle *handle = ConnectionHandle; SQLRETURN ret;
- TRACE("(hdbc %p, szSqlStrIn %s, cbSqlStrIn %d, szSqlStr %p, cbSqlStrMax %d, pcbSqlStr %p)\n", hdbc, - debugstr_wn(szSqlStrIn, cbSqlStrIn), cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr); + TRACE("(ConnectionHandle %p, InStatementText %s, TextLength1 %d, OutStatementText %p, BufferLength %d, " + "TextLength2 %p)\n", ConnectionHandle, debugstr_wn(InStatementText, TextLength1), TextLength1, + OutStatementText, BufferLength, TextLength2); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.ConnectionHandle = handle->unix_handle; ret = ODBC_CALL( SQLNativeSqlW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2442,20 +3016,24 @@ SQLRETURN WINAPI SQLNativeSqlW(SQLHDBC hdbc, SQLWCHAR *szSqlStrIn, SQLINTEGER cb /************************************************************************* * SQLPrimaryKeysW [ODBC32.165] */ -SQLRETURN WINAPI SQLPrimaryKeysW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, - SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, - SQLSMALLINT cbTableName) +SQLRETURN WINAPI SQLPrimaryKeysW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQLSMALLINT NameLength1, + SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *TableName, + SQLSMALLINT NameLength3) { - struct SQLPrimaryKeysW_params params = { hstmt, szCatalogName, cbCatalogName, szSchemaName, - cbSchemaName, szTableName, cbTableName }; + struct SQLPrimaryKeysW_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, TableName, + NameLength2 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s," - " cbTableName %d)\n", hstmt, - debugstr_wn(szCatalogName, cbCatalogName), cbCatalogName, - debugstr_wn(szSchemaName, cbSchemaName), cbSchemaName, - debugstr_wn(szTableName, cbTableName), cbTableName); + TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s," + " NameLength3 %d)\n", StatementHandle, + debugstr_wn(CatalogName, NameLength1), NameLength1, + debugstr_wn(SchemaName, NameLength2), NameLength2, + debugstr_wn(TableName, NameLength3), NameLength3); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLPrimaryKeysW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2464,22 +3042,25 @@ SQLRETURN WINAPI SQLPrimaryKeysW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMA /************************************************************************* * SQLProcedureColumnsW [ODBC32.166] */ -SQLRETURN WINAPI SQLProcedureColumnsW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, - SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szProcName, - SQLSMALLINT cbProcName, SQLWCHAR *szColumnName, SQLSMALLINT cbColumnName) +SQLRETURN WINAPI SQLProcedureColumnsW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQLSMALLINT NameLength1, + SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *ProcName, + SQLSMALLINT NameLength3, SQLWCHAR *ColumnName, SQLSMALLINT NameLength4 ) { - struct SQLProcedureColumnsW_params params = { hstmt, szCatalogName, cbCatalogName, szSchemaName, - cbSchemaName, szProcName, cbProcName, - szColumnName, cbColumnName }; + struct SQLProcedureColumnsW_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, + ProcName, NameLength3, ColumnName, NameLength4 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szProcName %s," - " cbProcName %d, szColumnName %s, cbColumnName %d)\n", hstmt, - debugstr_wn(szCatalogName, cbCatalogName), cbCatalogName, - debugstr_wn(szSchemaName, cbSchemaName), cbSchemaName, - debugstr_wn(szProcName, cbProcName), cbProcName, - debugstr_wn(szColumnName, cbColumnName), cbColumnName); + TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, ProcName %s," + " NameLength3 %d, ColumnName %s, NameLength4 %d)\n", StatementHandle, + debugstr_wn(CatalogName, NameLength1), NameLength1, + debugstr_wn(SchemaName, NameLength2), NameLength2, + debugstr_wn(ProcName, NameLength3), NameLength3, + debugstr_wn(ColumnName, NameLength4), NameLength4); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLProcedureColumnsW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2488,18 +3069,22 @@ SQLRETURN WINAPI SQLProcedureColumnsW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, S /************************************************************************* * SQLProceduresW [ODBC32.167] */ -SQLRETURN WINAPI SQLProceduresW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, - SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szProcName, - SQLSMALLINT cbProcName) +SQLRETURN WINAPI SQLProceduresW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQLSMALLINT NameLength1, + SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *ProcName, + SQLSMALLINT NameLength3) { - struct SQLProceduresW_params params = { hstmt, szCatalogName, cbCatalogName, szSchemaName, - cbSchemaName, szProcName, cbProcName }; + struct SQLProceduresW_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, ProcName, + NameLength3 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szProcName %s," - " cbProcName %d)\n", hstmt, debugstr_wn(szCatalogName, cbCatalogName), cbCatalogName, - debugstr_wn(szSchemaName, cbSchemaName), cbSchemaName, debugstr_wn(szProcName, cbProcName), cbProcName); + TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, ProcName %s," + " NameLength3 %d)\n", StatementHandle, debugstr_wn(CatalogName, NameLength1), NameLength1, + debugstr_wn(SchemaName, NameLength2), NameLength2, debugstr_wn(ProcName, NameLength3), NameLength3); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLProceduresW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2508,18 +3093,22 @@ SQLRETURN WINAPI SQLProceduresW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMAL /************************************************************************* * SQLTablePrivilegesW [ODBC32.170] */ -SQLRETURN WINAPI SQLTablePrivilegesW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQLSMALLINT cbCatalogName, - SQLWCHAR *szSchemaName, SQLSMALLINT cbSchemaName, SQLWCHAR *szTableName, - SQLSMALLINT cbTableName) +SQLRETURN WINAPI SQLTablePrivilegesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQLSMALLINT NameLength1, + SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *TableName, + SQLSMALLINT NameLength3) { - struct SQLTablePrivilegesW_params params = { hstmt, szCatalogName, cbCatalogName, szSchemaName, - cbSchemaName, szTableName, cbTableName }; + struct SQLTablePrivilegesW_params params = { 0, CatalogName, NameLength1, SchemaName, NameLength2, TableName, + NameLength3 }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s," - " cbTableName %d)\n", hstmt, debugstr_wn(szCatalogName, cbCatalogName), cbCatalogName, - debugstr_wn(szSchemaName, cbSchemaName), cbSchemaName, debugstr_wn(szTableName, cbTableName), cbTableName); + TRACE("(StatementHandle %p, CatalogName %s, NameLength1 %d, SchemaName %s, NameLength2 %d, TableName %s," + " NameLength3 %d)\n", StatementHandle, debugstr_wn(CatalogName, NameLength1), NameLength1, + debugstr_wn(SchemaName, NameLength2), NameLength2, debugstr_wn(TableName, NameLength3), NameLength3); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLTablePrivilegesW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2528,22 +3117,25 @@ SQLRETURN WINAPI SQLTablePrivilegesW(SQLHSTMT hstmt, SQLWCHAR *szCatalogName, SQ /************************************************************************* * SQLDriversW [ODBC32.171] */ -SQLRETURN WINAPI SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT fDirection, SQLWCHAR *szDriverDesc, - SQLSMALLINT cbDriverDescMax, SQLSMALLINT *pcbDriverDesc, - SQLWCHAR *szDriverAttributes, SQLSMALLINT cbDriverAttrMax, - SQLSMALLINT *pcbDriverAttr) +SQLRETURN WINAPI SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLWCHAR *DriverDescription, + SQLSMALLINT BufferLength1, SQLSMALLINT *DescriptionLength, SQLWCHAR *DriverAttributes, + SQLSMALLINT BufferLength2, SQLSMALLINT *AttributesLength) { - struct SQLDriversW_params params = { EnvironmentHandle, fDirection, szDriverDesc, cbDriverDescMax, - pcbDriverDesc, szDriverAttributes, cbDriverAttrMax, pcbDriverAttr }; + struct SQLDriversW_params params = { 0, Direction, DriverDescription, BufferLength1, DescriptionLength, + DriverAttributes, BufferLength2, AttributesLength }; + struct handle *handle = EnvironmentHandle; SQLRETURN ret;
- TRACE("(EnvironmentHandle %p, Direction %d, szDriverDesc %p, cbDriverDescMax %d, pcbDriverDesc %p," - " DriverAttributes %p, cbDriverAttrMax %d, pcbDriverAttr %p)\n", EnvironmentHandle, fDirection, - szDriverDesc, cbDriverDescMax, pcbDriverDesc, szDriverAttributes, cbDriverAttrMax, pcbDriverAttr); + TRACE("(EnvironmentHandle %p, Direction %d, DriverDescription %p, BufferLength1 %d, DescriptionLength %p," + " DriverAttributes %p, BufferLength2 %d, AttributesLength %p)\n", EnvironmentHandle, Direction, + DriverDescription, BufferLength1, DescriptionLength, DriverAttributes, BufferLength2, AttributesLength); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.EnvironmentHandle = handle->unix_handle; ret = ODBC_CALL( SQLDriversW, ¶ms );
- if (ret == SQL_NO_DATA && fDirection == SQL_FETCH_FIRST) + if (ret == SQL_NO_DATA && Direction == SQL_FETCH_FIRST) ERR_(winediag)("No ODBC drivers could be found. Check the settings for your libodbc provider.\n");
TRACE("Returning %d\n", ret); @@ -2556,12 +3148,16 @@ SQLRETURN WINAPI SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT fDirection, SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength) { - struct SQLSetDescFieldW_params params = { DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength }; + struct SQLSetDescFieldW_params params = { 0, RecNumber, FieldIdentifier, Value, BufferLength }; + struct handle *handle = DescriptorHandle; SQLRETURN ret;
TRACE("(DescriptorHandle %p, RecNumber %d, FieldIdentifier %d, Value %p, BufferLength %d)\n", DescriptorHandle, RecNumber, FieldIdentifier, Value, BufferLength);
+ if (!handle) return SQL_INVALID_HANDLE; + + params.DescriptorHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetDescFieldW, ¶ms ); TRACE("Returning %d\n", ret); return ret; @@ -2573,12 +3169,16 @@ SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumb SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { - struct SQLSetStmtAttrW_params params = { StatementHandle, Attribute, Value, StringLength }; + struct SQLSetStmtAttrW_params params = { 0, Attribute, Value, StringLength }; + struct handle *handle = StatementHandle; SQLRETURN ret;
- TRACE("(StatementHandle %p, Attribute %d, Value %p, StringLength %d)\n", StatementHandle, Attribute, Value, - StringLength); + TRACE("(StatementHandle %p, Attribute %d, Value %p, StringLength %d)\n", StatementHandle, Attribute, + Value, StringLength); + + if (!handle) return SQL_INVALID_HANDLE;
+ params.StatementHandle = handle->unix_handle; ret = ODBC_CALL( SQLSetStmtAttrW, ¶ms ); if (ret == SQL_ERROR && (Attribute == SQL_ROWSET_SIZE || Attribute == SQL_ATTR_ROW_ARRAY_SIZE)) { diff --git a/dlls/odbc32/unixlib.c b/dlls/odbc32/unixlib.c index c75f86e1a41..3b94180c5bc 100644 --- a/dlls/odbc32/unixlib.c +++ b/dlls/odbc32/unixlib.c @@ -189,7 +189,7 @@ static NTSTATUS wrap_SQLAllocConnect( void *args ) struct SQLAllocConnect_params *params = args;
if (!pSQLAllocConnect) return SQL_ERROR; - return pSQLAllocConnect(params->EnvironmentHandle, params->ConnectionHandle); + return pSQLAllocConnect( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC *)¶ms->ConnectionHandle ); }
static NTSTATUS wrap_SQLAllocEnv( void *args ) @@ -197,7 +197,7 @@ static NTSTATUS wrap_SQLAllocEnv( void *args ) struct SQLAllocEnv_params *params = args;
if (!pSQLAllocEnv) return SQL_ERROR; - return pSQLAllocEnv(params->EnvironmentHandle); + return pSQLAllocEnv( (SQLHENV *)¶ms->EnvironmentHandle ); }
static NTSTATUS wrap_SQLAllocHandle( void *args ) @@ -205,7 +205,8 @@ static NTSTATUS wrap_SQLAllocHandle( void *args ) struct SQLAllocHandle_params *params = args;
if (!pSQLAllocHandle) return SQL_ERROR; - return pSQLAllocHandle(params->HandleType, params->InputHandle, params->OutputHandle); + return pSQLAllocHandle( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->InputHandle, + (SQLHANDLE *)¶ms->OutputHandle ); }
static NTSTATUS wrap_SQLAllocHandleStd( void *args ) @@ -213,7 +214,8 @@ static NTSTATUS wrap_SQLAllocHandleStd( void *args ) struct SQLAllocHandleStd_params *params = args;
if (!pSQLAllocHandleStd) return SQL_ERROR; - return pSQLAllocHandleStd(params->HandleType, params->InputHandle, params->OutputHandle); + return pSQLAllocHandleStd( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->InputHandle, + (SQLHANDLE *)¶ms->OutputHandle ); }
static NTSTATUS wrap_SQLAllocStmt( void *args ) @@ -221,7 +223,7 @@ static NTSTATUS wrap_SQLAllocStmt( void *args ) struct SQLAllocStmt_params *params = args;
if (!pSQLAllocStmt) return SQL_ERROR; - return pSQLAllocStmt(params->ConnectionHandle, params->StatementHandle); + return pSQLAllocStmt( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, (SQLHSTMT *)¶ms->StatementHandle ); }
static NTSTATUS wrap_SQLBindCol( void *args ) @@ -229,8 +231,8 @@ static NTSTATUS wrap_SQLBindCol( void *args ) struct SQLBindCol_params *params = args;
if (!pSQLBindCol) return SQL_ERROR; - return pSQLBindCol(params->StatementHandle, params->ColumnNumber, params->TargetType, - params->TargetValue, params->BufferLength, params->StrLen_or_Ind); + return pSQLBindCol( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->TargetType, + params->TargetValue, params->BufferLength, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLBindParam( void *args ) @@ -238,9 +240,9 @@ static NTSTATUS wrap_SQLBindParam( void *args ) struct SQLBindParam_params *params = args;
if (!pSQLBindParam) return SQL_ERROR; - return pSQLBindParam(params->StatementHandle, params->ParameterNumber, params->ValueType, - params->ParameterType, params->LengthPrecision, params->ParameterScale, - params->ParameterValue, params->StrLen_or_Ind); + return pSQLBindParam( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, params->ValueType, + params->ParameterType, params->LengthPrecision, params->ParameterScale, + params->ParameterValue, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLBindParameter( void *args ) @@ -248,9 +250,10 @@ static NTSTATUS wrap_SQLBindParameter( void *args ) struct SQLBindParameter_params *params = args;
if (!pSQLBindParameter) return SQL_ERROR; - return pSQLBindParameter(params->hstmt, params->ipar, params->fParamType, params->fCType, - params->fSqlType, params->cbColDef, params->ibScale, params->rgbValue, - params->cbValueMax, params->pcbValue); + return pSQLBindParameter( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, + params->InputOutputType, params->ValueType, params->ParameterType, params->ColumnSize, + params->DecimalDigits, params->ParameterValue, params->BufferLength, + (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLBrowseConnect( void *args ) @@ -258,8 +261,9 @@ static NTSTATUS wrap_SQLBrowseConnect( void *args ) struct SQLBrowseConnect_params *params = args;
if (!pSQLBrowseConnect) return SQL_ERROR; - return pSQLBrowseConnect(params->hdbc, params->szConnStrIn, params->cbConnStrIn, params->szConnStrOut, - params->cbConnStrOutMax, params->pcbConnStrOut); + return pSQLBrowseConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InConnectionString, + params->StringLength1, params->OutConnectionString, params->BufferLength, + params->StringLength2 ); }
static NTSTATUS wrap_SQLBrowseConnectW( void *args ) @@ -267,8 +271,9 @@ static NTSTATUS wrap_SQLBrowseConnectW( void *args ) struct SQLBrowseConnectW_params *params = args;
if (!pSQLBrowseConnectW) return SQL_ERROR; - return pSQLBrowseConnectW(params->hdbc, params->szConnStrIn, params->cbConnStrIn, params->szConnStrOut, - params->cbConnStrOutMax, params->pcbConnStrOut); + return pSQLBrowseConnectW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InConnectionString, + params->StringLength1, params->OutConnectionString, params->BufferLength, + params->StringLength2 ); }
static NTSTATUS wrap_SQLBulkOperations( void *args ) @@ -276,7 +281,7 @@ static NTSTATUS wrap_SQLBulkOperations( void *args ) struct SQLBulkOperations_params *params = args;
if (!pSQLBulkOperations) return SQL_ERROR; - return pSQLBulkOperations(params->StatementHandle, params->Operation); + return pSQLBulkOperations( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Operation ); }
static NTSTATUS wrap_SQLCancel( void *args ) @@ -284,7 +289,7 @@ static NTSTATUS wrap_SQLCancel( void *args ) struct SQLCancel_params *params = args;
if (!pSQLCancel) return SQL_ERROR; - return pSQLCancel(params->StatementHandle); + return pSQLCancel( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); }
static NTSTATUS wrap_SQLCloseCursor( void *args ) @@ -292,7 +297,7 @@ static NTSTATUS wrap_SQLCloseCursor( void *args ) struct SQLCloseCursor_params *params = args;
if (!pSQLCloseCursor) return SQL_ERROR; - return pSQLCloseCursor(params->StatementHandle); + return pSQLCloseCursor( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); }
static NTSTATUS wrap_SQLColAttribute( void *args ) @@ -300,9 +305,9 @@ static NTSTATUS wrap_SQLColAttribute( void *args ) struct SQLColAttribute_params *params = args;
if (!pSQLColAttribute) return SQL_ERROR; - return pSQLColAttribute(params->StatementHandle, params->ColumnNumber, params->FieldIdentifier, - params->CharacterAttribute, params->BufferLength, params->StringLength, - params->NumericAttribute); + return pSQLColAttribute( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, + params->FieldIdentifier, params->CharacterAttribute, params->BufferLength, + params->StringLength, (SQLLEN *)(ULONG_PTR)params->NumericAttribute ); }
static NTSTATUS wrap_SQLColAttributeW( void *args ) @@ -310,9 +315,10 @@ static NTSTATUS wrap_SQLColAttributeW( void *args ) struct SQLColAttributeW_params *params = args;
if (!pSQLColAttributeW) return SQL_ERROR; - return pSQLColAttributeW(params->StatementHandle, params->ColumnNumber, params->FieldIdentifier, - params->CharacterAttribute, params->BufferLength, params->StringLength, - params->NumericAttribute); + return pSQLColAttributeW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, + params->FieldIdentifier, params->CharacterAttribute, + params->BufferLength, params->StringLength, + (SQLLEN *)(ULONG_PTR)params->NumericAttribute ); }
static NTSTATUS wrap_SQLColAttributes( void *args ) @@ -320,8 +326,9 @@ static NTSTATUS wrap_SQLColAttributes( void *args ) struct SQLColAttributes_params *params = args;
if (!pSQLColAttributes) return SQL_ERROR; - return pSQLColAttributes(params->hstmt, params->icol, params->fDescType, params->rgbDesc, - params->cbDescMax, params->pcbDesc, params->pfDesc); + return pSQLColAttributes( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, + params->FieldIdentifier, params->CharacterAttributes, params->BufferLength, + params->StringLength, (SQLLEN *)(ULONG_PTR)params->NumericAttributes ); }
static NTSTATUS wrap_SQLColAttributesW( void *args ) @@ -329,8 +336,9 @@ static NTSTATUS wrap_SQLColAttributesW( void *args ) struct SQLColAttributesW_params *params = args;
if (!pSQLColAttributesW) return SQL_ERROR; - return pSQLColAttributesW(params->hstmt, params->icol, params->fDescType, params->rgbDesc, - params->cbDescMax, params->pcbDesc, params->pfDesc); + return pSQLColAttributesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, + params->FieldIdentifier, params->CharacterAttributes, params->BufferLength, + params->StringLength, (SQLLEN *)(ULONG_PTR)params->NumericAttributes ); }
static NTSTATUS wrap_SQLColumnPrivileges( void *args ) @@ -338,9 +346,9 @@ static NTSTATUS wrap_SQLColumnPrivileges( void *args ) struct SQLColumnPrivileges_params *params = args;
if (!pSQLColumnPrivileges) return SQL_ERROR; - return pSQLColumnPrivileges(params->hstmt, params->szCatalogName, params->cbCatalogName, - params->szSchemaName, params->cbSchemaName, params->szTableName, - params->cbTableName, params->szColumnName, params->cbColumnName); + return pSQLColumnPrivileges( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, + params->TableName, params->NameLength3, params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLColumnPrivilegesW( void *args ) @@ -348,9 +356,9 @@ static NTSTATUS wrap_SQLColumnPrivilegesW( void *args ) struct SQLColumnPrivilegesW_params *params = args;
if (!pSQLColumnPrivilegesW) return SQL_ERROR; - return pSQLColumnPrivilegesW(params->hstmt, params->szCatalogName, params->cbCatalogName, - params->szSchemaName, params->cbSchemaName, params->szTableName, - params->cbTableName, params->szColumnName, params->cbColumnName); + return pSQLColumnPrivilegesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, + params->TableName, params->NameLength3, params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLColumns( void *args ) @@ -358,9 +366,9 @@ static NTSTATUS wrap_SQLColumns( void *args ) struct SQLColumns_params *params = args;
if (!pSQLColumns) return SQL_ERROR; - return pSQLColumns(params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, params->NameLength3, - params->ColumnName, params->NameLength4); + return pSQLColumns( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, params->NameLength3, + params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLColumnsW( void *args ) @@ -368,9 +376,9 @@ static NTSTATUS wrap_SQLColumnsW( void *args ) struct SQLColumnsW_params *params = args;
if (!pSQLColumnsW) return SQL_ERROR; - return pSQLColumnsW(params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, params->NameLength3, - params->ColumnName, params->NameLength4); + return pSQLColumnsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, params->NameLength3, + params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLConnect( void *args ) @@ -378,8 +386,8 @@ static NTSTATUS wrap_SQLConnect( void *args ) struct SQLConnect_params *params = args;
if (!pSQLConnect) return SQL_ERROR; - return pSQLConnect(params->ConnectionHandle, params->ServerName, params->NameLength1, params->UserName, - params->NameLength2, params->Authentication, params->NameLength3); + return pSQLConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->ServerName, params->NameLength1, + params->UserName, params->NameLength2, params->Authentication, params->NameLength3 ); }
static NTSTATUS wrap_SQLConnectW( void *args ) @@ -387,8 +395,8 @@ static NTSTATUS wrap_SQLConnectW( void *args ) struct SQLConnectW_params *params = args;
if (!pSQLConnectW) return SQL_ERROR; - return pSQLConnectW(params->ConnectionHandle, params->ServerName, params->NameLength1, - params->UserName, params->NameLength2, params->Authentication, params->NameLength3); + return pSQLConnectW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->ServerName, params->NameLength1, + params->UserName, params->NameLength2, params->Authentication, params->NameLength3 ); }
static NTSTATUS wrap_SQLCopyDesc( void *args ) @@ -396,7 +404,7 @@ static NTSTATUS wrap_SQLCopyDesc( void *args ) struct SQLCopyDesc_params *params = args;
if (!pSQLCopyDesc) return SQL_ERROR; - return pSQLCopyDesc(params->SourceDescHandle, params->TargetDescHandle); + return pSQLCopyDesc( (SQLHDESC)(ULONG_PTR)params->SourceDescHandle, (SQLHDESC)(ULONG_PTR)params->TargetDescHandle ); }
static NTSTATUS wrap_SQLDataSources( void *args ) @@ -404,9 +412,9 @@ static NTSTATUS wrap_SQLDataSources( void *args ) struct SQLDataSources_params *params = args;
if (!pSQLDataSources) return SQL_ERROR; - return pSQLDataSources(params->EnvironmentHandle, params->Direction, params->ServerName, - params->BufferLength1, params->NameLength1, params->Description, - params->BufferLength2, params->NameLength2); + return pSQLDataSources( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->ServerName, + params->BufferLength1, params->NameLength1, params->Description, + params->BufferLength2, params->NameLength2 ); }
static NTSTATUS wrap_SQLDataSourcesW( void *args ) @@ -414,9 +422,9 @@ static NTSTATUS wrap_SQLDataSourcesW( void *args ) struct SQLDataSourcesW_params *params = args;
if (!pSQLDataSourcesW) return SQL_ERROR; - return pSQLDataSourcesW(params->EnvironmentHandle, params->Direction, params->ServerName, - params->BufferLength1, params->NameLength1, params->Description, - params->BufferLength2, params->NameLength2); + return pSQLDataSourcesW( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->ServerName, + params->BufferLength1, params->NameLength1, params->Description, + params->BufferLength2, params->NameLength2 ); }
static NTSTATUS wrap_SQLDescribeCol( void *args ) @@ -424,9 +432,9 @@ static NTSTATUS wrap_SQLDescribeCol( void *args ) struct SQLDescribeCol_params *params = args;
if (!pSQLDescribeCol) return SQL_ERROR; - return pSQLDescribeCol(params->StatementHandle, params->ColumnNumber, params->ColumnName, - params->BufferLength, params->NameLength, params->DataType, - params->ColumnSize, params->DecimalDigits, params->Nullable); + return pSQLDescribeCol( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->ColumnName, + params->BufferLength, params->NameLength, params->DataType, + (SQLULEN *)(ULONG_PTR)params->ColumnSize, params->DecimalDigits, params->Nullable ); }
static NTSTATUS wrap_SQLDescribeColW( void *args ) @@ -434,9 +442,9 @@ static NTSTATUS wrap_SQLDescribeColW( void *args ) struct SQLDescribeColW_params *params = args;
if (!pSQLDescribeColW) return SQL_ERROR; - return pSQLDescribeColW(params->StatementHandle, params->ColumnNumber, params->ColumnName, - params->BufferLength, params->NameLength, params->DataType, - params->ColumnSize, params->DecimalDigits, params->Nullable); + return pSQLDescribeColW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->ColumnName, + params->BufferLength, params->NameLength, params->DataType, + (SQLULEN *)(ULONG_PTR)params->ColumnSize, params->DecimalDigits, params->Nullable ); }
static NTSTATUS wrap_SQLDescribeParam( void *args ) @@ -444,8 +452,8 @@ static NTSTATUS wrap_SQLDescribeParam( void *args ) struct SQLDescribeParam_params *params = args;
if (!pSQLDescribeParam) return SQL_ERROR; - return pSQLDescribeParam(params->hstmt, params->ipar, params->pfSqlType, params->pcbParamDef, - params->pibScale, params->pfNullable); + return pSQLDescribeParam( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, params->DataType, + (SQLULEN *)(ULONG_PTR)params->ParameterSize, params->DecimalDigits, params->Nullable ); }
static NTSTATUS wrap_SQLDisconnect( void *args ) @@ -453,7 +461,7 @@ static NTSTATUS wrap_SQLDisconnect( void *args ) struct SQLDisconnect_params *params = args;
if (!pSQLDisconnect) return SQL_ERROR; - return pSQLDisconnect(params->ConnectionHandle); + return pSQLDisconnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle ); }
static NTSTATUS wrap_SQLDriverConnect( void *args ) @@ -461,9 +469,9 @@ static NTSTATUS wrap_SQLDriverConnect( void *args ) struct SQLDriverConnect_params *params = args;
if (!pSQLDriverConnect) return SQL_ERROR; - return pSQLDriverConnect(params->hdbc, params->hwnd, params->ConnectionString, params->Length, - params->conn_str_out, params->conn_str_out_max, - params->ptr_conn_str_out, params->driver_completion); + return pSQLDriverConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, (SQLHWND)(ULONG_PTR)params->WindowHandle, + params->ConnectionString, params->Length, params->OutConnectionString, + params->BufferLength, params->Length2, params->DriverCompletion ); }
static NTSTATUS wrap_SQLDriverConnectW( void *args ) @@ -471,9 +479,9 @@ static NTSTATUS wrap_SQLDriverConnectW( void *args ) struct SQLDriverConnectW_params *params = args;
if (!pSQLDriverConnectW) return SQL_ERROR; - return pSQLDriverConnectW(params->ConnectionHandle, params->WindowHandle, params->InConnectionString, - params->Length, params->OutConnectionString, params->BufferLength, - params->Length2, params->DriverCompletion); + return pSQLDriverConnectW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, (SQLHWND)(ULONG_PTR)params->WindowHandle, + params->InConnectionString, params->Length, params->OutConnectionString, + params->BufferLength, params->Length2, params->DriverCompletion ); }
static NTSTATUS wrap_SQLDrivers( void *args ) @@ -481,9 +489,9 @@ static NTSTATUS wrap_SQLDrivers( void *args ) struct SQLDrivers_params *params = args;
if (!pSQLDrivers) return SQL_ERROR; - return pSQLDrivers(params->EnvironmentHandle, params->fDirection, params->szDriverDesc, - params->cbDriverDescMax, params->pcbDriverDesc, params->szDriverAttributes, - params->cbDriverAttrMax, params->pcbDriverAttr); + return pSQLDrivers( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->DriverDescription, + params->BufferLength1, params->DescriptionLength, params->DriverAttributes, + params->BufferLength2, params->AttributesLength ); }
static NTSTATUS wrap_SQLDriversW( void *args ) @@ -491,9 +499,9 @@ static NTSTATUS wrap_SQLDriversW( void *args ) struct SQLDriversW_params *params = args;
if (!pSQLDriversW) return SQL_ERROR; - return pSQLDriversW(params->EnvironmentHandle, params->fDirection, params->szDriverDesc, - params->cbDriverDescMax, params->pcbDriverDesc, params->szDriverAttributes, - params->cbDriverAttrMax, params->pcbDriverAttr); + return pSQLDriversW( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->DriverDescription, + params->BufferLength1, params->DescriptionLength, params->DriverAttributes, + params->BufferLength2, params->AttributesLength ); }
static NTSTATUS wrap_SQLEndTran( void *args ) @@ -501,7 +509,7 @@ static NTSTATUS wrap_SQLEndTran( void *args ) struct SQLEndTran_params *params = args;
if (!pSQLEndTran) return SQL_ERROR; - return pSQLEndTran(params->HandleType, params->Handle, params->CompletionType); + return pSQLEndTran( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->CompletionType ); }
static NTSTATUS wrap_SQLError( void *args ) @@ -509,9 +517,9 @@ static NTSTATUS wrap_SQLError( void *args ) struct SQLError_params *params = args;
if (!pSQLError) return SQL_ERROR; - return pSQLError(params->EnvironmentHandle, params->ConnectionHandle, params->StatementHandle, - params->Sqlstate, params->NativeError, params->MessageText, - params->BufferLength, params->TextLength); + return pSQLError( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, + (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->SqlState, params->NativeError, + params->MessageText, params->BufferLength, params->TextLength ); }
static NTSTATUS wrap_SQLErrorW( void *args ) @@ -519,9 +527,9 @@ static NTSTATUS wrap_SQLErrorW( void *args ) struct SQLErrorW_params *params = args;
if (!pSQLErrorW) return SQL_ERROR; - return pSQLErrorW(params->EnvironmentHandle, params->ConnectionHandle, params->StatementHandle, - params->Sqlstate, params->NativeError, params->MessageText, - params->BufferLength, params->TextLength); + return pSQLErrorW( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, + (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->SqlState, params->NativeError, + params->MessageText, params->BufferLength, params->TextLength ); }
static NTSTATUS wrap_SQLExecDirect( void *args ) @@ -529,7 +537,7 @@ static NTSTATUS wrap_SQLExecDirect( void *args ) struct SQLExecDirect_params *params = args;
if (!pSQLExecDirect) return SQL_ERROR; - return pSQLExecDirect(params->StatementHandle, params->StatementText, params->TextLength); + return pSQLExecDirect( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); }
static NTSTATUS wrap_SQLExecDirectW( void *args ) @@ -537,7 +545,7 @@ static NTSTATUS wrap_SQLExecDirectW( void *args ) struct SQLExecDirectW_params *params = args;
if (!pSQLExecDirectW) return SQL_ERROR; - return pSQLExecDirectW(params->StatementHandle, params->StatementText, params->TextLength); + return pSQLExecDirectW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); }
static NTSTATUS wrap_SQLExecute( void *args ) @@ -545,7 +553,7 @@ static NTSTATUS wrap_SQLExecute( void *args ) struct SQLExecute_params *params = args;
if (!pSQLExecute) return SQL_ERROR; - return pSQLExecute(params->StatementHandle); + return pSQLExecute( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); }
static NTSTATUS wrap_SQLExtendedFetch( void *args ) @@ -553,8 +561,8 @@ static NTSTATUS wrap_SQLExtendedFetch( void *args ) struct SQLExtendedFetch_params *params = args;
if (!pSQLExtendedFetch) return SQL_ERROR; - return pSQLExtendedFetch(params->hstmt, params->fFetchType, params->irow, - params->pcrow, params->rgfRowStatus); + return pSQLExtendedFetch( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->FetchOrientation, + params->FetchOffset, (SQLULEN *)(ULONG_PTR)params->RowCount, params->RowStatusArray ); }
static NTSTATUS wrap_SQLFetch( void *args ) @@ -562,7 +570,7 @@ static NTSTATUS wrap_SQLFetch( void *args ) struct SQLFetch_params *params = args;
if (!pSQLFetch) return SQL_ERROR; - return pSQLFetch(params->StatementHandle); + return pSQLFetch( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); }
static NTSTATUS wrap_SQLFetchScroll( void *args ) @@ -570,7 +578,8 @@ static NTSTATUS wrap_SQLFetchScroll( void *args ) struct SQLFetchScroll_params *params = args;
if (!pSQLFetchScroll) return SQL_ERROR; - return pSQLFetchScroll(params->StatementHandle, params->FetchOrientation, params->FetchOffset); + return pSQLFetchScroll( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->FetchOrientation, + params->FetchOffset ); }
static NTSTATUS wrap_SQLForeignKeys( void *args ) @@ -578,11 +587,11 @@ static NTSTATUS wrap_SQLForeignKeys( void *args ) struct SQLForeignKeys_params *params = args;
if (!pSQLForeignKeys) return SQL_ERROR; - return pSQLForeignKeys(params->hstmt, params->szPkCatalogName, params->cbPkCatalogName, - params->szPkSchemaName, params->cbPkSchemaName, params->szPkTableName, - params->cbPkTableName, params->szFkCatalogName, params->cbFkCatalogName, - params->szFkSchemaName, params->cbFkSchemaName, params->szFkTableName, - params->cbFkTableName); + return pSQLForeignKeys( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->PkCatalogName, + params->NameLength1, params->PkSchemaName, params->NameLength2, + params->PkTableName, params->NameLength3, params->FkCatalogName, + params->NameLength4, params->FkSchemaName, params->NameLength5, + params->FkTableName, params->NameLength6 ); }
static NTSTATUS wrap_SQLForeignKeysW( void *args ) @@ -590,11 +599,11 @@ static NTSTATUS wrap_SQLForeignKeysW( void *args ) struct SQLForeignKeysW_params *params = args;
if (!pSQLForeignKeysW) return SQL_ERROR; - return pSQLForeignKeysW(params->hstmt, params->szPkCatalogName, params->cbPkCatalogName, - params->szPkSchemaName, params->cbPkSchemaName, params->szPkTableName, - params->cbPkTableName, params->szFkCatalogName, params->cbFkCatalogName, - params->szFkSchemaName, params->cbFkSchemaName, params->szFkTableName, - params->cbFkTableName); + return pSQLForeignKeysW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->PkCatalogName, + params->NameLength1, params->PkSchemaName, params->NameLength2, + params->PkTableName, params->NameLength3, params->FkCatalogName, + params->NameLength4, params->FkSchemaName, params->NameLength5, + params->FkTableName, params->NameLength6 ); }
static NTSTATUS wrap_SQLFreeConnect( void *args ) @@ -602,7 +611,7 @@ static NTSTATUS wrap_SQLFreeConnect( void *args ) struct SQLFreeConnect_params *params = args;
if (!pSQLFreeConnect) return SQL_ERROR; - return pSQLFreeConnect(params->ConnectionHandle); + return pSQLFreeConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle ); }
static NTSTATUS wrap_SQLFreeEnv( void *args ) @@ -610,7 +619,7 @@ static NTSTATUS wrap_SQLFreeEnv( void *args ) struct SQLFreeEnv_params *params = args;
if (!pSQLFreeEnv) return SQL_ERROR; - return pSQLFreeEnv(params->EnvironmentHandle); + return pSQLFreeEnv( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle ); }
static NTSTATUS wrap_SQLFreeHandle( void *args ) @@ -618,7 +627,7 @@ static NTSTATUS wrap_SQLFreeHandle( void *args ) struct SQLFreeHandle_params *params = args;
if (!pSQLFreeHandle) return SQL_ERROR; - return pSQLFreeHandle(params->HandleType, params->Handle); + return pSQLFreeHandle( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle ); }
static NTSTATUS wrap_SQLFreeStmt( void *args ) @@ -626,7 +635,7 @@ static NTSTATUS wrap_SQLFreeStmt( void *args ) struct SQLFreeStmt_params *params = args;
if (!pSQLFreeStmt) return SQL_ERROR; - return pSQLFreeStmt(params->StatementHandle, params->Option); + return pSQLFreeStmt( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Option ); }
static NTSTATUS wrap_SQLGetConnectAttr( void *args ) @@ -634,8 +643,8 @@ static NTSTATUS wrap_SQLGetConnectAttr( void *args ) struct SQLGetConnectAttr_params *params = args;
if (!pSQLGetConnectAttr) return SQL_ERROR; - return pSQLGetConnectAttr(params->ConnectionHandle, params->Attribute, params->Value, - params->BufferLength, params->StringLength); + return pSQLGetConnectAttr( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetConnectAttrW( void *args ) @@ -643,8 +652,8 @@ static NTSTATUS wrap_SQLGetConnectAttrW( void *args ) struct SQLGetConnectAttrW_params *params = args;
if (!pSQLGetConnectAttrW) return SQL_ERROR; - return pSQLGetConnectAttrW(params->ConnectionHandle, params->Attribute, params->Value, - params->BufferLength, params->StringLength); + return pSQLGetConnectAttrW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetConnectOption( void *args ) @@ -652,7 +661,7 @@ static NTSTATUS wrap_SQLGetConnectOption( void *args ) struct SQLGetConnectOption_params *params = args;
if (!pSQLGetConnectOption) return SQL_ERROR; - return pSQLGetConnectOption(params->ConnectionHandle, params->Option, params->Value); + return pSQLGetConnectOption( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLGetConnectOptionW( void *args ) @@ -660,7 +669,7 @@ static NTSTATUS wrap_SQLGetConnectOptionW( void *args ) struct SQLGetConnectOptionW_params *params = args;
if (!pSQLGetConnectOptionW) return SQL_ERROR; - return pSQLGetConnectOptionW(params->ConnectionHandle, params->Option, params->Value); + return pSQLGetConnectOptionW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLGetCursorName( void *args ) @@ -668,8 +677,8 @@ static NTSTATUS wrap_SQLGetCursorName( void *args ) struct SQLGetCursorName_params *params = args;
if (!pSQLGetCursorName) return SQL_ERROR; - return pSQLGetCursorName(params->StatementHandle, params->CursorName, params->BufferLength, - params->NameLength); + return pSQLGetCursorName( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->BufferLength, + params->NameLength ); }
static NTSTATUS wrap_SQLGetCursorNameW( void *args ) @@ -677,8 +686,8 @@ static NTSTATUS wrap_SQLGetCursorNameW( void *args ) struct SQLGetCursorNameW_params *params = args;
if (!pSQLGetCursorNameW) return SQL_ERROR; - return pSQLGetCursorNameW(params->StatementHandle, params->CursorName, params->BufferLength, - params->NameLength); + return pSQLGetCursorNameW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->BufferLength, + params->NameLength ); }
static NTSTATUS wrap_SQLGetData( void *args ) @@ -686,8 +695,8 @@ static NTSTATUS wrap_SQLGetData( void *args ) struct SQLGetData_params *params = args;
if (!pSQLGetData) return SQL_ERROR; - return pSQLGetData(params->StatementHandle, params->ColumnNumber, params->TargetType, - params->TargetValue, params->BufferLength, params->StrLen_or_Ind); + return pSQLGetData( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->TargetType, + params->TargetValue, params->BufferLength, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLGetDescField( void *args ) @@ -695,8 +704,8 @@ static NTSTATUS wrap_SQLGetDescField( void *args ) struct SQLGetDescField_params *params = args;
if (!pSQLGetDescField) return SQL_ERROR; - return pSQLGetDescField(params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, - params->Value, params->BufferLength, params->StringLength); + return pSQLGetDescField( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, + params->Value, params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetDescFieldW( void *args ) @@ -704,8 +713,8 @@ static NTSTATUS wrap_SQLGetDescFieldW( void *args ) struct SQLGetDescFieldW_params *params = args;
if (!pSQLGetDescFieldW) return SQL_ERROR; - return pSQLGetDescFieldW(params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, - params->Value, params->BufferLength, params->StringLength); + return pSQLGetDescFieldW( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, + params->Value, params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetDescRec( void *args ) @@ -713,9 +722,9 @@ static NTSTATUS wrap_SQLGetDescRec( void *args ) struct SQLGetDescRec_params *params = args;
if (!pSQLGetDescRec) return SQL_ERROR; - return pSQLGetDescRec(params->DescriptorHandle, params->RecNumber, params->Name, params->BufferLength, - params->StringLength, params->Type, params->SubType, params->Length, - params->Precision, params->Scale, params->Nullable); + return pSQLGetDescRec( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->Name, + params->BufferLength, params->StringLength, params->Type, params->SubType, + (SQLLEN *)(ULONG_PTR)params->Length, params->Precision, params->Scale, params->Nullable ); }
static NTSTATUS wrap_SQLGetDescRecW( void *args ) @@ -723,9 +732,9 @@ static NTSTATUS wrap_SQLGetDescRecW( void *args ) struct SQLGetDescRecW_params *params = args;
if (!pSQLGetDescRecW) return SQL_ERROR; - return pSQLGetDescRecW(params->DescriptorHandle, params->RecNumber, params->Name, params->BufferLength, - params->StringLength, params->Type, params->SubType, params->Length, - params->Precision, params->Scale, params->Nullable); + return pSQLGetDescRecW( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->Name, + params->BufferLength, params->StringLength, params->Type, params->SubType, + (SQLLEN *)(ULONG_PTR)params->Length, params->Precision, params->Scale, params->Nullable ); }
static NTSTATUS wrap_SQLGetDiagField( void *args ) @@ -733,8 +742,8 @@ static NTSTATUS wrap_SQLGetDiagField( void *args ) struct SQLGetDiagField_params *params = args;
if (!pSQLGetDiagField) return SQL_ERROR; - return pSQLGetDiagField(params->HandleType, params->Handle, params->RecNumber, params->DiagIdentifier, - params->DiagInfo, params->BufferLength, params->StringLength); + return pSQLGetDiagField( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, + params->DiagIdentifier, params->DiagInfo, params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetDiagFieldW( void *args ) @@ -742,8 +751,8 @@ static NTSTATUS wrap_SQLGetDiagFieldW( void *args ) struct SQLGetDiagFieldW_params *params = args;
if (!pSQLGetDiagFieldW) return SQL_ERROR; - return pSQLGetDiagFieldW(params->HandleType, params->Handle, params->RecNumber, params->DiagIdentifier, - params->DiagInfo, params->BufferLength, params->StringLength); + return pSQLGetDiagFieldW( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, + params->DiagIdentifier, params->DiagInfo, params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetDiagRec( void *args ) @@ -751,9 +760,8 @@ static NTSTATUS wrap_SQLGetDiagRec( void *args ) struct SQLGetDiagRec_params *params = args;
if (!pSQLGetDiagRec) return SQL_ERROR; - return pSQLGetDiagRec(params->HandleType, params->Handle, params->RecNumber, params->Sqlstate, - params->NativeError, params->MessageText, params->BufferLength, - params->TextLength); + return pSQLGetDiagRec( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, params->SqlState, + params->NativeError, params->MessageText, params->BufferLength, params->TextLength ); }
static NTSTATUS wrap_SQLGetDiagRecW( void *args ) @@ -761,9 +769,8 @@ static NTSTATUS wrap_SQLGetDiagRecW( void *args ) struct SQLGetDiagRecW_params *params = args;
if (!pSQLGetDiagRecW) return SQL_ERROR; - return pSQLGetDiagRecW(params->HandleType, params->Handle, params->RecNumber, params->Sqlstate, - params->NativeError, params->MessageText, params->BufferLength, - params->TextLength); + return pSQLGetDiagRecW( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, params->SqlState, + params->NativeError, params->MessageText, params->BufferLength, params->TextLength ); }
static NTSTATUS wrap_SQLGetEnvAttr( void *args ) @@ -771,8 +778,8 @@ static NTSTATUS wrap_SQLGetEnvAttr( void *args ) struct SQLGetEnvAttr_params *params = args;
if (!pSQLGetEnvAttr) return SQL_ERROR; - return pSQLGetEnvAttr(params->EnvironmentHandle, params->Attribute, params->Value, - params->BufferLength, params->StringLength); + return pSQLGetEnvAttr( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Attribute, + params->Value, params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetFunctions( void *args ) @@ -780,7 +787,7 @@ static NTSTATUS wrap_SQLGetFunctions( void *args ) struct SQLGetFunctions_params *params = args;
if (!pSQLGetFunctions) return SQL_ERROR; - return pSQLGetFunctions(params->ConnectionHandle, params->FunctionId, params->Supported); + return pSQLGetFunctions( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->FunctionId, params->Supported ); }
static NTSTATUS wrap_SQLGetInfo( void *args ) @@ -788,8 +795,8 @@ static NTSTATUS wrap_SQLGetInfo( void *args ) struct SQLGetInfo_params *params = args;
if (!pSQLGetInfo) return SQL_ERROR; - return pSQLGetInfo(params->ConnectionHandle, params->InfoType, params->InfoValue, - params->BufferLength, params->StringLength); + return pSQLGetInfo( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InfoType, params->InfoValue, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetInfoW( void *args ) @@ -797,8 +804,8 @@ static NTSTATUS wrap_SQLGetInfoW( void *args ) struct SQLGetInfoW_params *params = args;
if (!pSQLGetInfoW) return SQL_ERROR; - return pSQLGetInfoW(params->ConnectionHandle, params->InfoType, params->InfoValue, - params->BufferLength, params->StringLength); + return pSQLGetInfoW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InfoType, params->InfoValue, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetStmtAttr( void *args ) @@ -806,8 +813,8 @@ static NTSTATUS wrap_SQLGetStmtAttr( void *args ) struct SQLGetStmtAttr_params *params = args;
if (!pSQLGetStmtAttr) return SQL_ERROR; - return pSQLGetStmtAttr(params->StatementHandle, params->Attribute, params->Value, - params->BufferLength, params->StringLength); + return pSQLGetStmtAttr( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetStmtAttrW( void *args ) @@ -815,8 +822,8 @@ static NTSTATUS wrap_SQLGetStmtAttrW( void *args ) struct SQLGetStmtAttrW_params *params = args;
if (!pSQLGetStmtAttrW) return SQL_ERROR; - return pSQLGetStmtAttrW(params->StatementHandle, params->Attribute, params->Value, - params->BufferLength, params->StringLength); + return pSQLGetStmtAttrW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetStmtOption( void *args ) @@ -824,7 +831,7 @@ static NTSTATUS wrap_SQLGetStmtOption( void *args ) struct SQLGetStmtOption_params *params = args;
if (!pSQLGetStmtOption) return SQL_ERROR; - return pSQLGetStmtOption(params->StatementHandle, params->Option, params->Value); + return pSQLGetStmtOption( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLGetTypeInfo( void *args ) @@ -832,7 +839,7 @@ static NTSTATUS wrap_SQLGetTypeInfo( void *args ) struct SQLGetTypeInfo_params *params = args;
if (!pSQLGetTypeInfo) return SQL_ERROR; - return pSQLGetTypeInfo(params->StatementHandle, params->DataType); + return pSQLGetTypeInfo( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->DataType ); }
static NTSTATUS wrap_SQLGetTypeInfoW( void *args ) @@ -840,7 +847,7 @@ static NTSTATUS wrap_SQLGetTypeInfoW( void *args ) struct SQLGetTypeInfoW_params *params = args;
if (!pSQLGetTypeInfoW) return SQL_ERROR; - return pSQLGetTypeInfoW(params->StatementHandle, params->DataType); + return pSQLGetTypeInfoW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->DataType ); }
static NTSTATUS wrap_SQLMoreResults( void *args ) @@ -848,7 +855,7 @@ static NTSTATUS wrap_SQLMoreResults( void *args ) struct SQLMoreResults_params *params = args;
if (!pSQLMoreResults) return SQL_ERROR; - return pSQLMoreResults(params->StatementHandle); + return pSQLMoreResults( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); }
static NTSTATUS wrap_SQLNativeSql( void *args ) @@ -856,8 +863,8 @@ static NTSTATUS wrap_SQLNativeSql( void *args ) struct SQLNativeSql_params *params = args;
if (!pSQLNativeSql) return SQL_ERROR; - return pSQLNativeSql(params->hdbc, params->szSqlStrIn, params->cbSqlStrIn, params->szSqlStr, - params->cbSqlStrMax, params->pcbSqlStr); + return pSQLNativeSql( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InStatementText, params->TextLength1, + params->OutStatementText, params->BufferLength, params->TextLength2 ); }
static NTSTATUS wrap_SQLNativeSqlW( void *args ) @@ -865,8 +872,8 @@ static NTSTATUS wrap_SQLNativeSqlW( void *args ) struct SQLNativeSqlW_params *params = args;
if (!pSQLNativeSqlW) return SQL_ERROR; - return pSQLNativeSqlW(params->hdbc, params->szSqlStrIn, params->cbSqlStrIn, params->szSqlStr, - params->cbSqlStrMax, params->pcbSqlStr); + return pSQLNativeSqlW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InStatementText, params->TextLength1, + params->OutStatementText, params->BufferLength, params->TextLength2 ); }
static NTSTATUS wrap_SQLNumParams( void *args ) @@ -874,7 +881,7 @@ static NTSTATUS wrap_SQLNumParams( void *args ) struct SQLNumParams_params *params = args;
if (!pSQLNumParams) return SQL_ERROR; - return pSQLNumParams(params->hstmt, params->pcpar); + return pSQLNumParams( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterCount ); }
static NTSTATUS wrap_SQLNumResultCols( void *args ) @@ -882,7 +889,7 @@ static NTSTATUS wrap_SQLNumResultCols( void *args ) struct SQLNumResultCols_params *params = args;
if (!pSQLNumResultCols) return SQL_ERROR; - return pSQLNumResultCols(params->StatementHandle, params->ColumnCount); + return pSQLNumResultCols( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnCount ); }
static NTSTATUS wrap_SQLParamData( void *args ) @@ -890,7 +897,7 @@ static NTSTATUS wrap_SQLParamData( void *args ) struct SQLParamData_params *params = args;
if (!pSQLParamData) return SQL_ERROR; - return pSQLParamData(params->StatementHandle, params->Value); + return pSQLParamData( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Value ); }
static NTSTATUS wrap_SQLParamOptions( void *args ) @@ -898,7 +905,8 @@ static NTSTATUS wrap_SQLParamOptions( void *args ) struct SQLParamOptions_params *params = args;
if (!pSQLParamOptions) return SQL_ERROR; - return pSQLParamOptions(params->hstmt, params->crow, params->pirow); + return pSQLParamOptions( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->RowCount, + (SQLULEN *)(ULONG_PTR)params->RowNumber ); }
static NTSTATUS wrap_SQLPrepare( void *args ) @@ -906,7 +914,7 @@ static NTSTATUS wrap_SQLPrepare( void *args ) struct SQLPrepare_params *params = args;
if (!pSQLPrepare) return SQL_ERROR; - return pSQLPrepare(params->StatementHandle, params->StatementText, params->TextLength); + return pSQLPrepare( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); }
static NTSTATUS wrap_SQLPrepareW( void *args ) @@ -914,7 +922,7 @@ static NTSTATUS wrap_SQLPrepareW( void *args ) struct SQLPrepareW_params *params = args;
if (!pSQLPrepareW) return SQL_ERROR; - return pSQLPrepareW(params->StatementHandle, params->StatementText, params->TextLength); + return pSQLPrepareW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); }
static NTSTATUS wrap_SQLPrimaryKeys( void *args ) @@ -922,9 +930,8 @@ static NTSTATUS wrap_SQLPrimaryKeys( void *args ) struct SQLPrimaryKeys_params *params = args;
if (!pSQLPrimaryKeys) return SQL_ERROR; - return pSQLPrimaryKeys(params->hstmt, params->szCatalogName, params->cbCatalogName, - params->szSchemaName, params->cbSchemaName, - params->szTableName, params->cbTableName); + return pSQLPrimaryKeys( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, params->NameLength3 ); }
static NTSTATUS wrap_SQLPrimaryKeysW( void *args ) @@ -932,9 +939,8 @@ static NTSTATUS wrap_SQLPrimaryKeysW( void *args ) struct SQLPrimaryKeysW_params *params = args;
if (!pSQLPrimaryKeysW) return SQL_ERROR; - return pSQLPrimaryKeysW(params->hstmt, params->szCatalogName, params->cbCatalogName, - params->szSchemaName, params->cbSchemaName, - params->szTableName, params->cbTableName); + return pSQLPrimaryKeysW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, params->NameLength3 ); }
static NTSTATUS wrap_SQLProcedureColumns( void *args ) @@ -942,9 +948,9 @@ static NTSTATUS wrap_SQLProcedureColumns( void *args ) struct SQLProcedureColumns_params *params = args;
if (!pSQLProcedureColumns) return SQL_ERROR; - return pSQLProcedureColumns(params->hstmt, params->szCatalogName, params->cbCatalogName, - params->szSchemaName, params->cbSchemaName, params->szProcName, - params->cbProcName, params->szColumnName, params->cbColumnName); + return pSQLProcedureColumns( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, params->ProcName, + params->NameLength3, params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLProcedureColumnsW( void *args ) @@ -952,9 +958,9 @@ static NTSTATUS wrap_SQLProcedureColumnsW( void *args ) struct SQLProcedureColumnsW_params *params = args;
if (!pSQLProcedureColumnsW) return SQL_ERROR; - return pSQLProcedureColumnsW(params->hstmt, params->szCatalogName, params->cbCatalogName, - params->szSchemaName, params->cbSchemaName, params->szProcName, - params->cbProcName, params->szColumnName, params->cbColumnName); + return pSQLProcedureColumnsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, params->ProcName, + params->NameLength3, params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLProcedures( void *args ) @@ -962,9 +968,8 @@ static NTSTATUS wrap_SQLProcedures( void *args ) struct SQLProcedures_params *params = args;
if (!pSQLProcedures) return SQL_ERROR; - return pSQLProcedures(params->hstmt, params->szCatalogName, params->cbCatalogName, - params->szSchemaName, params->cbSchemaName, params->szProcName, - params->cbProcName); + return pSQLProcedures( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->ProcName, params->NameLength3 ); }
static NTSTATUS wrap_SQLProceduresW( void *args ) @@ -972,9 +977,8 @@ static NTSTATUS wrap_SQLProceduresW( void *args ) struct SQLProceduresW_params *params = args;
if (!pSQLProceduresW) return SQL_ERROR; - return pSQLProceduresW(params->hstmt, params->szCatalogName, params->cbCatalogName, - params->szSchemaName, params->cbSchemaName, params->szProcName, - params->cbProcName); + return pSQLProceduresW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->ProcName, params->NameLength3 ); }
static NTSTATUS wrap_SQLPutData( void *args ) @@ -982,7 +986,7 @@ static NTSTATUS wrap_SQLPutData( void *args ) struct SQLPutData_params *params = args;
if (!pSQLPutData) return SQL_ERROR; - return pSQLPutData(params->StatementHandle, params->Data, params->StrLen_or_Ind); + return pSQLPutData( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Data, params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLRowCount( void *args ) @@ -990,7 +994,7 @@ static NTSTATUS wrap_SQLRowCount( void *args ) struct SQLRowCount_params *params = args;
if (!pSQLRowCount) return SQL_ERROR; - return pSQLRowCount(params->StatementHandle, params->RowCount); + return pSQLRowCount( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, (SQLLEN *)(ULONG_PTR)params->RowCount ); }
static NTSTATUS wrap_SQLSetConnectAttr( void *args ) @@ -998,8 +1002,8 @@ static NTSTATUS wrap_SQLSetConnectAttr( void *args ) struct SQLSetConnectAttr_params *params = args;
if (!pSQLSetConnectAttr) return SQL_ERROR; - return pSQLSetConnectAttr(params->ConnectionHandle, params->Attribute, params->Value, - params->StringLength); + return pSQLSetConnectAttr( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, + params->StringLength ); }
static NTSTATUS wrap_SQLSetConnectAttrW( void *args ) @@ -1007,8 +1011,8 @@ static NTSTATUS wrap_SQLSetConnectAttrW( void *args ) struct SQLSetConnectAttrW_params *params = args;
if (!pSQLSetConnectAttrW) return SQL_ERROR; - return pSQLSetConnectAttrW(params->ConnectionHandle, params->Attribute, params->Value, - params->StringLength); + return pSQLSetConnectAttrW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, + params->StringLength ); }
static NTSTATUS wrap_SQLSetConnectOption( void *args ) @@ -1016,7 +1020,7 @@ static NTSTATUS wrap_SQLSetConnectOption( void *args ) struct SQLSetConnectOption_params *params = args;
if (!pSQLSetConnectOption) return SQL_ERROR; - return pSQLSetConnectOption(params->ConnectionHandle, params->Option, params->Value); + return pSQLSetConnectOption( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLSetConnectOptionW( void *args ) @@ -1024,7 +1028,7 @@ static NTSTATUS wrap_SQLSetConnectOptionW( void *args ) struct SQLSetConnectOptionW_params *params = args;
if (!pSQLSetConnectOptionW) return SQL_ERROR; - return pSQLSetConnectOptionW(params->ConnectionHandle, params->Option, params->Value); + return pSQLSetConnectOptionW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLSetCursorName( void *args ) @@ -1032,7 +1036,7 @@ static NTSTATUS wrap_SQLSetCursorName( void *args ) struct SQLSetCursorName_params *params = args;
if (!pSQLSetCursorName) return SQL_ERROR; - return pSQLSetCursorName(params->StatementHandle, params->CursorName, params->NameLength); + return pSQLSetCursorName( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->NameLength ); }
static NTSTATUS wrap_SQLSetCursorNameW( void *args ) @@ -1040,7 +1044,7 @@ static NTSTATUS wrap_SQLSetCursorNameW( void *args ) struct SQLSetCursorNameW_params *params = args;
if (!pSQLSetCursorNameW) return SQL_ERROR; - return pSQLSetCursorNameW(params->StatementHandle, params->CursorName, params->NameLength); + return pSQLSetCursorNameW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->NameLength ); }
static NTSTATUS wrap_SQLSetDescField( void *args ) @@ -1048,8 +1052,8 @@ static NTSTATUS wrap_SQLSetDescField( void *args ) struct SQLSetDescField_params *params = args;
if (!pSQLSetDescField) return SQL_ERROR; - return pSQLSetDescField(params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, - params->Value, params->BufferLength); + return pSQLSetDescField( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, + params->Value, params->BufferLength ); }
static NTSTATUS wrap_SQLSetDescFieldW( void *args ) @@ -1057,8 +1061,8 @@ static NTSTATUS wrap_SQLSetDescFieldW( void *args ) struct SQLSetDescFieldW_params *params = args;
if (!pSQLSetDescFieldW) return SQL_ERROR; - return pSQLSetDescFieldW(params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, - params->Value, params->BufferLength); + return pSQLSetDescFieldW( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, + params->Value, params->BufferLength ); }
static NTSTATUS wrap_SQLSetDescRec( void *args ) @@ -1066,9 +1070,10 @@ static NTSTATUS wrap_SQLSetDescRec( void *args ) struct SQLSetDescRec_params *params = args;
if (!pSQLSetDescRec) return SQL_ERROR; - return pSQLSetDescRec(params->DescriptorHandle, params->RecNumber, params->Type, params->SubType, - params->Length, params->Precision, params->Scale, params->Data, - params->StringLength, params->Indicator); + return pSQLSetDescRec( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->Type, + params->SubType, params->Length, params->Precision, params->Scale, + params->Data, (SQLLEN *)(ULONG_PTR)params->StringLength, + (SQLLEN *)(ULONG_PTR)params->Indicator ); }
static NTSTATUS wrap_SQLSetEnvAttr( void *args ) @@ -1076,7 +1081,8 @@ static NTSTATUS wrap_SQLSetEnvAttr( void *args ) struct SQLSetEnvAttr_params *params = args;
if (!pSQLSetEnvAttr) return SQL_ERROR; - return pSQLSetEnvAttr(params->EnvironmentHandle, params->Attribute, params->Value, params->StringLength); + return pSQLSetEnvAttr( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Attribute, params->Value, + params->StringLength ); }
static NTSTATUS wrap_SQLSetParam( void *args ) @@ -1084,9 +1090,9 @@ static NTSTATUS wrap_SQLSetParam( void *args ) struct SQLSetParam_params *params = args;
if (!pSQLSetParam) return SQL_ERROR; - return pSQLSetParam(params->StatementHandle, params->ParameterNumber, params->ValueType, - params->ParameterType, params->LengthPrecision, params->ParameterScale, - params->ParameterValue, params->StrLen_or_Ind); + return pSQLSetParam( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, params->ValueType, + params->ParameterType, params->LengthPrecision, params->ParameterScale, + params->ParameterValue, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLSetPos( void *args ) @@ -1094,7 +1100,8 @@ static NTSTATUS wrap_SQLSetPos( void *args ) struct SQLSetPos_params *params = args;
if (!pSQLSetPos) return SQL_ERROR; - return pSQLSetPos(params->hstmt, params->irow, params->fOption, params->fLock); + return pSQLSetPos( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->RowNumber, params->Operation, + params->LockType ); }
static NTSTATUS wrap_SQLSetScrollOptions( void *args ) @@ -1102,8 +1109,8 @@ static NTSTATUS wrap_SQLSetScrollOptions( void *args ) struct SQLSetScrollOptions_params *params = args;
if (!pSQLSetScrollOptions) return SQL_ERROR; - return pSQLSetScrollOptions(params->statement_handle, params->f_concurrency, - params->crow_keyset, params->crow_rowset); + return pSQLSetScrollOptions( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Concurrency, + params->KeySetSize, params->RowSetSize ); }
static NTSTATUS wrap_SQLSetStmtAttr( void *args ) @@ -1111,7 +1118,8 @@ static NTSTATUS wrap_SQLSetStmtAttr( void *args ) struct SQLSetStmtAttr_params *params = args;
if (!pSQLSetStmtAttr) return SQL_ERROR; - return pSQLSetStmtAttr(params->StatementHandle, params->Attribute, params->Value, params->StringLength); + return pSQLSetStmtAttr( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, + params->StringLength ); }
static NTSTATUS wrap_SQLSetStmtAttrW( void *args ) @@ -1119,7 +1127,8 @@ static NTSTATUS wrap_SQLSetStmtAttrW( void *args ) struct SQLSetStmtAttrW_params *params = args;
if (!pSQLSetStmtAttrW) return SQL_ERROR; - return pSQLSetStmtAttrW(params->StatementHandle, params->Attribute, params->Value, params->StringLength); + return pSQLSetStmtAttrW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, + params->StringLength ); }
static NTSTATUS wrap_SQLSetStmtOption( void *args ) @@ -1127,7 +1136,7 @@ static NTSTATUS wrap_SQLSetStmtOption( void *args ) struct SQLSetStmtOption_params *params = args;
if (!pSQLSetStmtOption) return SQL_ERROR; - return pSQLSetStmtOption(params->StatementHandle, params->Option, params->Value); + return pSQLSetStmtOption( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLSpecialColumns( void *args ) @@ -1135,9 +1144,9 @@ static NTSTATUS wrap_SQLSpecialColumns( void *args ) struct SQLSpecialColumns_params *params = args;
if (!pSQLSpecialColumns) return SQL_ERROR; - return pSQLSpecialColumns(params->StatementHandle, params->IdentifierType, params->CatalogName, - params->NameLength1, params->SchemaName, params->NameLength2, - params->TableName, params->NameLength3, params->Scope, params->Nullable); + return pSQLSpecialColumns( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->IdentifierType, + params->CatalogName, params->NameLength1, params->SchemaName, params->NameLength2, + params->TableName, params->NameLength3, params->Scope, params->Nullable ); }
static NTSTATUS wrap_SQLSpecialColumnsW( void *args ) @@ -1145,9 +1154,9 @@ static NTSTATUS wrap_SQLSpecialColumnsW( void *args ) struct SQLSpecialColumnsW_params *params = args;
if (!pSQLSpecialColumnsW) return SQL_ERROR; - return pSQLSpecialColumnsW(params->StatementHandle, params->IdentifierType, params->CatalogName, - params->NameLength1, params->SchemaName, params->NameLength2, - params->TableName, params->NameLength3, params->Scope, params->Nullable); + return pSQLSpecialColumnsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->IdentifierType, + params->CatalogName, params->NameLength1, params->SchemaName, params->NameLength2, + params->TableName, params->NameLength3, params->Scope, params->Nullable ); }
static NTSTATUS wrap_SQLStatistics( void *args ) @@ -1155,9 +1164,9 @@ static NTSTATUS wrap_SQLStatistics( void *args ) struct SQLStatistics_params *params = args;
if (!pSQLStatistics) return SQL_ERROR; - return pSQLStatistics(params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, - params->NameLength3, params->Unique, params->Reserved); + return pSQLStatistics( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3, params->Unique, params->Reserved ); }
static NTSTATUS wrap_SQLStatisticsW( void *args ) @@ -1165,9 +1174,9 @@ static NTSTATUS wrap_SQLStatisticsW( void *args ) struct SQLStatisticsW_params *params = args;
if (!pSQLStatisticsW) return SQL_ERROR; - return pSQLStatisticsW(params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, - params->NameLength3, params->Unique, params->Reserved); + return pSQLStatisticsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3, params->Unique, params->Reserved ); }
static NTSTATUS wrap_SQLTablePrivileges( void *args ) @@ -1175,9 +1184,9 @@ static NTSTATUS wrap_SQLTablePrivileges( void *args ) struct SQLTablePrivileges_params *params = args;
if (!pSQLTablePrivileges) return SQL_ERROR; - return pSQLTablePrivileges(params->hstmt, params->szCatalogName, params->cbCatalogName, - params->szSchemaName, params->cbSchemaName, params->szTableName, - params->cbTableName); + return pSQLTablePrivileges( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3 ); }
static NTSTATUS wrap_SQLTablePrivilegesW( void *args ) @@ -1185,9 +1194,9 @@ static NTSTATUS wrap_SQLTablePrivilegesW( void *args ) struct SQLTablePrivilegesW_params *params = args;
if (!pSQLTablePrivilegesW) return SQL_ERROR; - return pSQLTablePrivilegesW(params->hstmt, params->szCatalogName, params->cbCatalogName, - params->szSchemaName, params->cbSchemaName, params->szTableName, - params->cbTableName); + return pSQLTablePrivilegesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3 ); }
static NTSTATUS wrap_SQLTables( void *args ) @@ -1195,9 +1204,9 @@ static NTSTATUS wrap_SQLTables( void *args ) struct SQLTables_params *params = args;
if (!pSQLTables) return SQL_ERROR; - return pSQLTables(params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, - params->NameLength3, params->TableType, params->NameLength4); + return pSQLTables( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3, params->TableType, params->NameLength4 ); }
static NTSTATUS wrap_SQLTablesW( void *args ) @@ -1205,9 +1214,9 @@ static NTSTATUS wrap_SQLTablesW( void *args ) struct SQLTablesW_params *params = args;
if (!pSQLTablesW) return SQL_ERROR; - return pSQLTablesW(params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, - params->NameLength3, params->TableType, params->NameLength4); + return pSQLTablesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3, params->TableType, params->NameLength4 ); }
static NTSTATUS wrap_SQLTransact( void *args ) @@ -1215,10 +1224,11 @@ static NTSTATUS wrap_SQLTransact( void *args ) struct SQLTransact_params *params = args;
if (!pSQLTransact) return SQL_ERROR; - return pSQLTransact(params->EnvironmentHandle, params->ConnectionHandle, params->CompletionType); + return pSQLTransact( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, + params->CompletionType ); }
-const unixlib_entry_t __wine_unix_call_funcs[NB_ODBC_FUNCS] = +const unixlib_entry_t __wine_unix_call_funcs[] = { odbc_process_attach, odbc_process_detach, @@ -1339,6 +1349,8 @@ const unixlib_entry_t __wine_unix_call_funcs[NB_ODBC_FUNCS] = wrap_SQLTransact, };
+C_ASSERT( ARRAYSIZE( __wine_unix_call_funcs) == unix_funcs_count ); + static NTSTATUS load_odbc(void) { const char *s = getenv("LIB_ODBC_DRIVER_MANAGER"); diff --git a/dlls/odbc32/unixlib.h b/dlls/odbc32/unixlib.h index f1a6a17634e..f2e6f00284f 100644 --- a/dlls/odbc32/unixlib.h +++ b/dlls/odbc32/unixlib.h @@ -25,14 +25,8 @@ */
#include <stdarg.h> - #include "windef.h" #include "winbase.h" - -#include "sql.h" -#include "sqltypes.h" -#include "sqlext.h" - #include "wine/unixlib.h"
enum sql_funcs @@ -154,121 +148,1108 @@ enum sql_funcs unix_SQLTables, unix_SQLTablesW, unix_SQLTransact, - NB_ODBC_FUNCS -}; - -struct SQLAllocConnect_params { SQLHENV EnvironmentHandle; SQLHDBC *ConnectionHandle; }; -struct SQLAllocEnv_params { SQLHENV *EnvironmentHandle; }; -struct SQLAllocHandle_params { SQLSMALLINT HandleType; SQLHANDLE InputHandle; SQLHANDLE *OutputHandle; }; -struct SQLAllocHandleStd_params { SQLSMALLINT HandleType; SQLHANDLE InputHandle; SQLHANDLE *OutputHandle; }; -struct SQLAllocStmt_params { SQLHDBC ConnectionHandle; SQLHSTMT *StatementHandle; }; -struct SQLBindCol_params { SQLHSTMT StatementHandle; SQLUSMALLINT ColumnNumber; SQLSMALLINT TargetType; SQLPOINTER TargetValue; SQLLEN BufferLength; SQLLEN *StrLen_or_Ind; }; -struct SQLBindParam_params { SQLHSTMT StatementHandle; SQLUSMALLINT ParameterNumber; SQLSMALLINT ValueType; SQLSMALLINT ParameterType; SQLULEN LengthPrecision; SQLSMALLINT ParameterScale; SQLPOINTER ParameterValue; SQLLEN *StrLen_or_Ind; }; -struct SQLBindParameter_params { SQLHSTMT hstmt; SQLUSMALLINT ipar; SQLSMALLINT fParamType; SQLSMALLINT fCType; SQLSMALLINT fSqlType; SQLULEN cbColDef; SQLSMALLINT ibScale; SQLPOINTER rgbValue; SQLLEN cbValueMax; SQLLEN *pcbValue; }; -struct SQLBrowseConnect_params { SQLHDBC hdbc; SQLCHAR *szConnStrIn; SQLSMALLINT cbConnStrIn; SQLCHAR *szConnStrOut; SQLSMALLINT cbConnStrOutMax; SQLSMALLINT *pcbConnStrOut; }; -struct SQLBrowseConnectW_params { SQLHDBC hdbc; SQLWCHAR *szConnStrIn; SQLSMALLINT cbConnStrIn; SQLWCHAR *szConnStrOut; SQLSMALLINT cbConnStrOutMax; SQLSMALLINT *pcbConnStrOut; }; -struct SQLBulkOperations_params { SQLHSTMT StatementHandle; SQLSMALLINT Operation; }; -struct SQLCancel_params { SQLHSTMT StatementHandle; }; -struct SQLCloseCursor_params { SQLHSTMT StatementHandle; }; -struct SQLColAttribute_params { SQLHSTMT StatementHandle; SQLUSMALLINT ColumnNumber; SQLUSMALLINT FieldIdentifier; SQLPOINTER CharacterAttribute; SQLSMALLINT BufferLength; SQLSMALLINT *StringLength; SQLLEN *NumericAttribute; }; -struct SQLColAttributeW_params { SQLHSTMT StatementHandle; SQLUSMALLINT ColumnNumber; SQLUSMALLINT FieldIdentifier; SQLPOINTER CharacterAttribute; SQLSMALLINT BufferLength; SQLSMALLINT *StringLength; SQLLEN *NumericAttribute; }; -struct SQLColAttributes_params { SQLHSTMT hstmt; SQLUSMALLINT icol; SQLUSMALLINT fDescType; SQLPOINTER rgbDesc; SQLSMALLINT cbDescMax; SQLSMALLINT *pcbDesc; SQLLEN *pfDesc; }; -struct SQLColAttributesW_params { SQLHSTMT hstmt; SQLUSMALLINT icol; SQLUSMALLINT fDescType; SQLPOINTER rgbDesc; SQLSMALLINT cbDescMax; SQLSMALLINT *pcbDesc; SQLLEN *pfDesc; }; -struct SQLColumnPrivileges_params { SQLHSTMT hstmt; SQLCHAR *szCatalogName; SQLSMALLINT cbCatalogName; SQLCHAR *szSchemaName; SQLSMALLINT cbSchemaName; SQLCHAR *szTableName; SQLSMALLINT cbTableName; SQLCHAR *szColumnName; SQLSMALLINT cbColumnName; }; -struct SQLColumnPrivilegesW_params { SQLHSTMT hstmt; SQLWCHAR *szCatalogName; SQLSMALLINT cbCatalogName; SQLWCHAR *szSchemaName; SQLSMALLINT cbSchemaName; SQLWCHAR *szTableName; SQLSMALLINT cbTableName; SQLWCHAR *szColumnName; SQLSMALLINT cbColumnName; }; -struct SQLColumns_params { SQLHSTMT StatementHandle; SQLCHAR *CatalogName; SQLSMALLINT NameLength1; SQLCHAR *SchemaName; SQLSMALLINT NameLength2; SQLCHAR *TableName; SQLSMALLINT NameLength3; SQLCHAR *ColumnName; SQLSMALLINT NameLength4; }; -struct SQLColumnsW_params { SQLHSTMT StatementHandle; WCHAR *CatalogName; SQLSMALLINT NameLength1; WCHAR *SchemaName; SQLSMALLINT NameLength2; WCHAR *TableName; SQLSMALLINT NameLength3; WCHAR *ColumnName; SQLSMALLINT NameLength4; }; -struct SQLConnect_params { SQLHDBC ConnectionHandle; SQLCHAR *ServerName; SQLSMALLINT NameLength1; SQLCHAR *UserName; SQLSMALLINT NameLength2; SQLCHAR *Authentication; SQLSMALLINT NameLength3; }; -struct SQLConnectW_params { SQLHDBC ConnectionHandle; WCHAR *ServerName; SQLSMALLINT NameLength1; WCHAR *UserName; SQLSMALLINT NameLength2; WCHAR *Authentication; SQLSMALLINT NameLength3; }; -struct SQLCopyDesc_params { SQLHDESC SourceDescHandle; SQLHDESC TargetDescHandle; }; -struct SQLDataSources_params { SQLHENV EnvironmentHandle; SQLUSMALLINT Direction; SQLCHAR *ServerName; SQLSMALLINT BufferLength1; SQLSMALLINT *NameLength1; SQLCHAR *Description; SQLSMALLINT BufferLength2; SQLSMALLINT *NameLength2; }; -struct SQLDataSourcesW_params { SQLHENV EnvironmentHandle; SQLUSMALLINT Direction; WCHAR *ServerName; SQLSMALLINT BufferLength1; SQLSMALLINT *NameLength1; WCHAR *Description; SQLSMALLINT BufferLength2; SQLSMALLINT *NameLength2; }; -struct SQLDescribeCol_params { SQLHSTMT StatementHandle; SQLUSMALLINT ColumnNumber; SQLCHAR *ColumnName; SQLSMALLINT BufferLength; SQLSMALLINT *NameLength; SQLSMALLINT *DataType; SQLULEN *ColumnSize; SQLSMALLINT *DecimalDigits; SQLSMALLINT *Nullable; }; -struct SQLDescribeColW_params { SQLHSTMT StatementHandle; SQLUSMALLINT ColumnNumber; WCHAR *ColumnName; SQLSMALLINT BufferLength; SQLSMALLINT *NameLength; SQLSMALLINT *DataType; SQLULEN *ColumnSize; SQLSMALLINT *DecimalDigits; SQLSMALLINT *Nullable; }; -struct SQLDescribeParam_params { SQLHSTMT hstmt; SQLUSMALLINT ipar; SQLSMALLINT *pfSqlType; SQLULEN *pcbParamDef; SQLSMALLINT *pibScale; SQLSMALLINT *pfNullable; }; -struct SQLDisconnect_params { SQLHDBC ConnectionHandle; }; -struct SQLDriverConnect_params { SQLHDBC hdbc; SQLHWND hwnd; SQLCHAR *ConnectionString; SQLSMALLINT Length; SQLCHAR *conn_str_out; SQLSMALLINT conn_str_out_max; SQLSMALLINT *ptr_conn_str_out; SQLUSMALLINT driver_completion; }; -struct SQLDriverConnectW_params { SQLHDBC ConnectionHandle; SQLHWND WindowHandle; WCHAR *InConnectionString; SQLSMALLINT Length; WCHAR *OutConnectionString; SQLSMALLINT BufferLength; SQLSMALLINT *Length2; SQLUSMALLINT DriverCompletion; }; -struct SQLDrivers_params { SQLHENV EnvironmentHandle; SQLUSMALLINT fDirection; SQLCHAR *szDriverDesc; SQLSMALLINT cbDriverDescMax; SQLSMALLINT *pcbDriverDesc; SQLCHAR *szDriverAttributes; SQLSMALLINT cbDriverAttrMax; SQLSMALLINT *pcbDriverAttr; }; -struct SQLDriversW_params { SQLHENV EnvironmentHandle; SQLUSMALLINT fDirection; SQLWCHAR *szDriverDesc; SQLSMALLINT cbDriverDescMax; SQLSMALLINT *pcbDriverDesc; SQLWCHAR *szDriverAttributes; SQLSMALLINT cbDriverAttrMax; SQLSMALLINT *pcbDriverAttr; }; -struct SQLEndTran_params { SQLSMALLINT HandleType; SQLHANDLE Handle; SQLSMALLINT CompletionType; }; -struct SQLError_params { SQLHENV EnvironmentHandle; SQLHDBC ConnectionHandle; SQLHSTMT StatementHandle; SQLCHAR *Sqlstate; SQLINTEGER *NativeError; SQLCHAR *MessageText; SQLSMALLINT BufferLength; SQLSMALLINT *TextLength; }; -struct SQLErrorW_params { SQLHENV EnvironmentHandle; SQLHDBC ConnectionHandle; SQLHSTMT StatementHandle; WCHAR *Sqlstate; SQLINTEGER *NativeError; WCHAR *MessageText; SQLSMALLINT BufferLength; SQLSMALLINT *TextLength; }; -struct SQLExecDirect_params { SQLHSTMT StatementHandle; SQLCHAR *StatementText; SQLINTEGER TextLength; }; -struct SQLExecDirectW_params { SQLHSTMT StatementHandle; WCHAR *StatementText; SQLINTEGER TextLength; }; -struct SQLExecute_params { SQLHSTMT StatementHandle; }; -struct SQLExtendedFetch_params { SQLHSTMT hstmt; SQLUSMALLINT fFetchType; SQLLEN irow; SQLULEN *pcrow; SQLUSMALLINT *rgfRowStatus; }; -struct SQLFetch_params { SQLHSTMT StatementHandle; }; -struct SQLFetchScroll_params { SQLHSTMT StatementHandle; SQLSMALLINT FetchOrientation; SQLLEN FetchOffset; }; -struct SQLForeignKeys_params { SQLHSTMT hstmt; SQLCHAR *szPkCatalogName; SQLSMALLINT cbPkCatalogName; SQLCHAR *szPkSchemaName; SQLSMALLINT cbPkSchemaName; SQLCHAR *szPkTableName; SQLSMALLINT cbPkTableName; SQLCHAR *szFkCatalogName; SQLSMALLINT cbFkCatalogName; SQLCHAR *szFkSchemaName; SQLSMALLINT cbFkSchemaName; SQLCHAR *szFkTableName; SQLSMALLINT cbFkTableName; }; -struct SQLForeignKeysW_params { SQLHSTMT hstmt; SQLWCHAR *szPkCatalogName; SQLSMALLINT cbPkCatalogName; SQLWCHAR *szPkSchemaName; SQLSMALLINT cbPkSchemaName; SQLWCHAR *szPkTableName; SQLSMALLINT cbPkTableName; SQLWCHAR *szFkCatalogName; SQLSMALLINT cbFkCatalogName; SQLWCHAR *szFkSchemaName; SQLSMALLINT cbFkSchemaName; SQLWCHAR *szFkTableName; SQLSMALLINT cbFkTableName; }; -struct SQLFreeConnect_params { SQLHDBC ConnectionHandle; }; -struct SQLFreeEnv_params { SQLHENV EnvironmentHandle; }; -struct SQLFreeHandle_params { SQLSMALLINT HandleType; SQLHANDLE Handle; }; -struct SQLFreeStmt_params { SQLHSTMT StatementHandle; SQLUSMALLINT Option; }; -struct SQLGetConnectAttr_params { SQLHDBC ConnectionHandle; SQLINTEGER Attribute; SQLPOINTER Value; SQLINTEGER BufferLength; SQLINTEGER *StringLength; }; -struct SQLGetConnectAttrW_params { SQLHDBC ConnectionHandle; SQLINTEGER Attribute; SQLPOINTER Value; SQLINTEGER BufferLength; SQLINTEGER *StringLength; }; -struct SQLGetConnectOption_params { SQLHDBC ConnectionHandle; SQLUSMALLINT Option; SQLPOINTER Value; }; -struct SQLGetConnectOptionW_params { SQLHDBC ConnectionHandle; SQLUSMALLINT Option; SQLPOINTER Value; }; -struct SQLGetCursorName_params { SQLHSTMT StatementHandle; SQLCHAR *CursorName; SQLSMALLINT BufferLength; SQLSMALLINT *NameLength; }; -struct SQLGetCursorNameW_params { SQLHSTMT StatementHandle; WCHAR *CursorName; SQLSMALLINT BufferLength; SQLSMALLINT *NameLength; }; -struct SQLGetData_params { SQLHSTMT StatementHandle; SQLUSMALLINT ColumnNumber; SQLSMALLINT TargetType; SQLPOINTER TargetValue; SQLLEN BufferLength; SQLLEN *StrLen_or_Ind; }; -struct SQLGetDescField_params { SQLHDESC DescriptorHandle; SQLSMALLINT RecNumber; SQLSMALLINT FieldIdentifier; SQLPOINTER Value; SQLINTEGER BufferLength; SQLINTEGER *StringLength; }; -struct SQLGetDescFieldW_params { SQLHDESC DescriptorHandle; SQLSMALLINT RecNumber; SQLSMALLINT FieldIdentifier; SQLPOINTER Value; SQLINTEGER BufferLength; SQLINTEGER *StringLength; }; -struct SQLGetDescRec_params { SQLHDESC DescriptorHandle; SQLSMALLINT RecNumber; SQLCHAR *Name; SQLSMALLINT BufferLength; SQLSMALLINT *StringLength; SQLSMALLINT *Type; SQLSMALLINT *SubType; SQLLEN *Length; SQLSMALLINT *Precision; SQLSMALLINT *Scale; SQLSMALLINT *Nullable; }; -struct SQLGetDescRecW_params { SQLHDESC DescriptorHandle; SQLSMALLINT RecNumber; WCHAR *Name; SQLSMALLINT BufferLength; SQLSMALLINT *StringLength; SQLSMALLINT *Type; SQLSMALLINT *SubType; SQLLEN *Length; SQLSMALLINT *Precision; SQLSMALLINT *Scale; SQLSMALLINT *Nullable; }; -struct SQLGetDiagField_params { SQLSMALLINT HandleType; SQLHANDLE Handle; SQLSMALLINT RecNumber; SQLSMALLINT DiagIdentifier; SQLPOINTER DiagInfo; SQLSMALLINT BufferLength; SQLSMALLINT *StringLength; }; -struct SQLGetDiagFieldW_params { SQLSMALLINT HandleType; SQLHANDLE Handle; SQLSMALLINT RecNumber; SQLSMALLINT DiagIdentifier; SQLPOINTER DiagInfo; SQLSMALLINT BufferLength; SQLSMALLINT *StringLength; }; -struct SQLGetDiagRec_params { SQLSMALLINT HandleType; SQLHANDLE Handle; SQLSMALLINT RecNumber; SQLCHAR *Sqlstate; SQLINTEGER *NativeError; SQLCHAR *MessageText; SQLSMALLINT BufferLength; SQLSMALLINT *TextLength; }; -struct SQLGetDiagRecW_params { SQLSMALLINT HandleType; SQLHANDLE Handle; SQLSMALLINT RecNumber; WCHAR *Sqlstate; SQLINTEGER *NativeError; WCHAR *MessageText; SQLSMALLINT BufferLength; SQLSMALLINT *TextLength; }; -struct SQLGetEnvAttr_params { SQLHENV EnvironmentHandle; SQLINTEGER Attribute; SQLPOINTER Value; SQLINTEGER BufferLength; SQLINTEGER *StringLength; }; -struct SQLGetFunctions_params { SQLHDBC ConnectionHandle; SQLUSMALLINT FunctionId; SQLUSMALLINT *Supported; }; -struct SQLGetInfo_params { SQLHDBC ConnectionHandle; SQLUSMALLINT InfoType; SQLPOINTER InfoValue; SQLSMALLINT BufferLength; SQLSMALLINT *StringLength; }; -struct SQLGetInfoW_params { SQLHDBC ConnectionHandle; SQLUSMALLINT InfoType; SQLPOINTER InfoValue; SQLSMALLINT BufferLength; SQLSMALLINT *StringLength; }; -struct SQLGetStmtAttr_params { SQLHSTMT StatementHandle; SQLINTEGER Attribute; SQLPOINTER Value; SQLINTEGER BufferLength; SQLINTEGER *StringLength; }; -struct SQLGetStmtAttrW_params { SQLHSTMT StatementHandle; SQLINTEGER Attribute; SQLPOINTER Value; SQLINTEGER BufferLength; SQLINTEGER *StringLength; }; -struct SQLGetStmtOption_params { SQLHSTMT StatementHandle; SQLUSMALLINT Option; SQLPOINTER Value; }; -struct SQLGetTypeInfo_params { SQLHSTMT StatementHandle; SQLSMALLINT DataType; }; -struct SQLGetTypeInfoW_params { SQLHSTMT StatementHandle; SQLSMALLINT DataType; }; -struct SQLMoreResults_params { SQLHSTMT StatementHandle; }; -struct SQLNativeSql_params { SQLHDBC hdbc; SQLCHAR *szSqlStrIn; SQLINTEGER cbSqlStrIn; SQLCHAR *szSqlStr; SQLINTEGER cbSqlStrMax; SQLINTEGER *pcbSqlStr; }; -struct SQLNativeSqlW_params { SQLHDBC hdbc; SQLWCHAR *szSqlStrIn; SQLINTEGER cbSqlStrIn; SQLWCHAR *szSqlStr; SQLINTEGER cbSqlStrMax; SQLINTEGER *pcbSqlStr; }; -struct SQLNumParams_params { SQLHSTMT hstmt; SQLSMALLINT *pcpar; }; -struct SQLNumResultCols_params { SQLHSTMT StatementHandle; SQLSMALLINT *ColumnCount; }; -struct SQLParamData_params { SQLHSTMT StatementHandle; SQLPOINTER *Value; }; -struct SQLParamOptions_params { SQLHSTMT hstmt; SQLULEN crow; SQLULEN *pirow; }; -struct SQLPrepare_params { SQLHSTMT StatementHandle; SQLCHAR *StatementText; SQLINTEGER TextLength; }; -struct SQLPrepareW_params { SQLHSTMT StatementHandle; WCHAR *StatementText; SQLINTEGER TextLength; }; -struct SQLPrimaryKeys_params { SQLHSTMT hstmt; SQLCHAR *szCatalogName; SQLSMALLINT cbCatalogName; SQLCHAR *szSchemaName; SQLSMALLINT cbSchemaName; SQLCHAR *szTableName; SQLSMALLINT cbTableName; }; -struct SQLPrimaryKeysW_params { SQLHSTMT hstmt; SQLWCHAR *szCatalogName; SQLSMALLINT cbCatalogName; SQLWCHAR *szSchemaName; SQLSMALLINT cbSchemaName; SQLWCHAR *szTableName; SQLSMALLINT cbTableName; }; -struct SQLProcedureColumns_params { SQLHSTMT hstmt; SQLCHAR *szCatalogName; SQLSMALLINT cbCatalogName; SQLCHAR *szSchemaName; SQLSMALLINT cbSchemaName; SQLCHAR *szProcName; SQLSMALLINT cbProcName; SQLCHAR *szColumnName; SQLSMALLINT cbColumnName; }; -struct SQLProcedureColumnsW_params { SQLHSTMT hstmt; SQLWCHAR *szCatalogName; SQLSMALLINT cbCatalogName; SQLWCHAR *szSchemaName; SQLSMALLINT cbSchemaName; SQLWCHAR *szProcName; SQLSMALLINT cbProcName; SQLWCHAR *szColumnName; SQLSMALLINT cbColumnName; }; -struct SQLProcedures_params { SQLHSTMT hstmt; SQLCHAR *szCatalogName; SQLSMALLINT cbCatalogName; SQLCHAR *szSchemaName; SQLSMALLINT cbSchemaName; SQLCHAR *szProcName; SQLSMALLINT cbProcName; }; -struct SQLProceduresW_params { SQLHSTMT hstmt; SQLWCHAR *szCatalogName; SQLSMALLINT cbCatalogName; SQLWCHAR *szSchemaName; SQLSMALLINT cbSchemaName; SQLWCHAR *szProcName; SQLSMALLINT cbProcName; }; -struct SQLPutData_params { SQLHSTMT StatementHandle; SQLPOINTER Data; SQLLEN StrLen_or_Ind; }; -struct SQLRowCount_params { SQLHSTMT StatementHandle; SQLLEN *RowCount; }; -struct SQLSetConnectAttr_params { SQLHDBC ConnectionHandle; SQLINTEGER Attribute; SQLPOINTER Value; SQLINTEGER StringLength; }; -struct SQLSetConnectAttrW_params { SQLHDBC ConnectionHandle; SQLINTEGER Attribute; SQLPOINTER Value; SQLINTEGER StringLength; }; -struct SQLSetConnectOption_params { SQLHDBC ConnectionHandle; SQLUSMALLINT Option; SQLULEN Value; }; -struct SQLSetConnectOptionW_params { SQLHDBC ConnectionHandle; SQLUSMALLINT Option; SQLULEN Value; }; -struct SQLSetCursorName_params { SQLHSTMT StatementHandle; SQLCHAR *CursorName; SQLSMALLINT NameLength; }; -struct SQLSetCursorNameW_params { SQLHSTMT StatementHandle; WCHAR *CursorName; SQLSMALLINT NameLength; }; -struct SQLSetDescField_params { SQLHDESC DescriptorHandle; SQLSMALLINT RecNumber; SQLSMALLINT FieldIdentifier; SQLPOINTER Value; SQLINTEGER BufferLength; }; -struct SQLSetDescFieldW_params { SQLHDESC DescriptorHandle; SQLSMALLINT RecNumber; SQLSMALLINT FieldIdentifier; SQLPOINTER Value; SQLINTEGER BufferLength; }; -struct SQLSetDescRec_params { SQLHDESC DescriptorHandle; SQLSMALLINT RecNumber; SQLSMALLINT Type; SQLSMALLINT SubType; SQLLEN Length; SQLSMALLINT Precision; SQLSMALLINT Scale; SQLPOINTER Data; SQLLEN *StringLength; SQLLEN *Indicator; }; -struct SQLSetEnvAttr_params { SQLHENV EnvironmentHandle; SQLINTEGER Attribute; SQLPOINTER Value; SQLINTEGER StringLength; }; -struct SQLSetParam_params { SQLHSTMT StatementHandle; SQLUSMALLINT ParameterNumber; SQLSMALLINT ValueType; SQLSMALLINT ParameterType; SQLULEN LengthPrecision; SQLSMALLINT ParameterScale; SQLPOINTER ParameterValue; SQLLEN *StrLen_or_Ind; }; -struct SQLSetPos_params { SQLHSTMT hstmt; SQLSETPOSIROW irow; SQLUSMALLINT fOption; SQLUSMALLINT fLock; }; -struct SQLSetScrollOptions_params { SQLHSTMT statement_handle; SQLUSMALLINT f_concurrency; SQLLEN crow_keyset; SQLUSMALLINT crow_rowset; }; -struct SQLSetStmtAttr_params { SQLHSTMT StatementHandle; SQLINTEGER Attribute; SQLPOINTER Value; SQLINTEGER StringLength; }; -struct SQLSetStmtAttrW_params { SQLHSTMT StatementHandle; SQLINTEGER Attribute; SQLPOINTER Value; SQLINTEGER StringLength; }; -struct SQLSetStmtOption_params { SQLHSTMT StatementHandle; SQLUSMALLINT Option; SQLULEN Value; }; -struct SQLSpecialColumns_params { SQLHSTMT StatementHandle; SQLUSMALLINT IdentifierType; SQLCHAR *CatalogName; SQLSMALLINT NameLength1; SQLCHAR *SchemaName; SQLSMALLINT NameLength2; SQLCHAR *TableName; SQLSMALLINT NameLength3; SQLUSMALLINT Scope; SQLUSMALLINT Nullable; }; -struct SQLSpecialColumnsW_params { SQLHSTMT StatementHandle; SQLUSMALLINT IdentifierType; SQLWCHAR *CatalogName; SQLSMALLINT NameLength1; SQLWCHAR *SchemaName; SQLSMALLINT NameLength2; SQLWCHAR *TableName; SQLSMALLINT NameLength3; SQLUSMALLINT Scope; SQLUSMALLINT Nullable; }; -struct SQLStatistics_params { SQLHSTMT StatementHandle; SQLCHAR *CatalogName; SQLSMALLINT NameLength1; SQLCHAR *SchemaName; SQLSMALLINT NameLength2; SQLCHAR *TableName; SQLSMALLINT NameLength3; SQLUSMALLINT Unique; SQLUSMALLINT Reserved; }; -struct SQLStatisticsW_params { SQLHSTMT StatementHandle; SQLWCHAR *CatalogName; SQLSMALLINT NameLength1; SQLWCHAR *SchemaName; SQLSMALLINT NameLength2; SQLWCHAR *TableName; SQLSMALLINT NameLength3; SQLUSMALLINT Unique; SQLUSMALLINT Reserved; }; -struct SQLTablePrivileges_params { SQLHSTMT hstmt; SQLCHAR *szCatalogName; SQLSMALLINT cbCatalogName; SQLCHAR *szSchemaName; SQLSMALLINT cbSchemaName; SQLCHAR *szTableName; SQLSMALLINT cbTableName; }; -struct SQLTablePrivilegesW_params { SQLHSTMT hstmt; SQLWCHAR *szCatalogName; SQLSMALLINT cbCatalogName; SQLWCHAR *szSchemaName; SQLSMALLINT cbSchemaName; SQLWCHAR *szTableName; SQLSMALLINT cbTableName; }; -struct SQLTables_params { SQLHSTMT StatementHandle; SQLCHAR *CatalogName; SQLSMALLINT NameLength1; SQLCHAR *SchemaName; SQLSMALLINT NameLength2; SQLCHAR *TableName; SQLSMALLINT NameLength3; SQLCHAR *TableType; SQLSMALLINT NameLength4; }; -struct SQLTablesW_params { SQLHSTMT StatementHandle; SQLWCHAR *CatalogName; SQLSMALLINT NameLength1; SQLWCHAR *SchemaName; SQLSMALLINT NameLength2; SQLWCHAR *TableName; SQLSMALLINT NameLength3; SQLWCHAR *TableType; SQLSMALLINT NameLength4; }; -struct SQLTransact_params { SQLHENV EnvironmentHandle; SQLHDBC ConnectionHandle; SQLUSMALLINT CompletionType; }; + unix_funcs_count +}; + +struct param +{ + INT64 len; /* result length stored in Unix lib */ + void *ptr; /* result length ptr passed by client */ +}; + +struct param_binding +{ + UINT32 count; + struct param *param; +}; + +struct handle +{ + UINT64 unix_handle; + struct param_binding bind_col; + struct param_binding bind_param; + struct param_binding bind_parameter; +}; + +struct SQLAllocConnect_params +{ + UINT64 EnvironmentHandle; + UINT64 ConnectionHandle; +}; + +struct SQLAllocEnv_params +{ + UINT64 EnvironmentHandle; +}; + +struct SQLAllocHandle_params +{ + INT16 HandleType; + UINT64 InputHandle; + UINT64 OutputHandle; +}; + +struct SQLAllocHandleStd_params +{ + INT16 HandleType; + UINT64 InputHandle; + UINT64 OutputHandle; +}; + +struct SQLAllocStmt_params +{ + UINT64 ConnectionHandle; + UINT64 StatementHandle; +}; + +struct SQLBindCol_params +{ + UINT64 StatementHandle; + UINT16 ColumnNumber; + INT16 TargetType; + void *TargetValue; + INT64 BufferLength; + INT64 *StrLen_or_Ind; +}; + +struct SQLBindParam_params +{ + UINT64 StatementHandle; + UINT16 ParameterNumber; + INT16 ValueType; + INT16 ParameterType; + UINT64 LengthPrecision; + INT16 ParameterScale; + void *ParameterValue; + INT64 *StrLen_or_Ind; +}; + +struct SQLBindParameter_params +{ + UINT64 StatementHandle; + UINT16 ParameterNumber; + INT16 InputOutputType; + INT16 ValueType; + INT16 ParameterType; + UINT64 ColumnSize; + INT16 DecimalDigits; + void *ParameterValue; + INT64 BufferLength; + INT64 *StrLen_or_Ind; +}; + +struct SQLBrowseConnect_params +{ + UINT64 ConnectionHandle; + UCHAR *InConnectionString; + INT16 StringLength1; + UCHAR *OutConnectionString; + INT16 BufferLength; + INT16 *StringLength2; +}; + +struct SQLBrowseConnectW_params +{ + UINT64 ConnectionHandle; + WCHAR *InConnectionString; + INT16 StringLength1; + WCHAR *OutConnectionString; + INT16 BufferLength; + INT16 *StringLength2; +}; + +struct SQLBulkOperations_params +{ + UINT64 StatementHandle; + INT16 Operation; +}; + +struct SQLCancel_params +{ + UINT64 StatementHandle; +}; + +struct SQLCloseCursor_params +{ + UINT64 StatementHandle; +}; + +struct SQLColAttribute_params +{ + UINT64 StatementHandle; + UINT16 ColumnNumber; + UINT16 FieldIdentifier; + void *CharacterAttribute; + INT16 BufferLength; + INT16 *StringLength; + INT64 *NumericAttribute; +}; + +struct SQLColAttributeW_params +{ + UINT64 StatementHandle; + UINT16 ColumnNumber; + UINT16 FieldIdentifier; + void *CharacterAttribute; + INT16 BufferLength; + INT16 *StringLength; + INT64 *NumericAttribute; +}; + +struct SQLColAttributes_params +{ + UINT64 StatementHandle; + UINT16 ColumnNumber; + UINT16 FieldIdentifier; + void *CharacterAttributes; + INT16 BufferLength; + INT16 *StringLength; + INT64 *NumericAttributes; +}; + +struct SQLColAttributesW_params +{ + UINT64 StatementHandle; + UINT16 ColumnNumber; + UINT16 FieldIdentifier; + void *CharacterAttributes; + INT16 BufferLength; + INT16 *StringLength; + INT64 *NumericAttributes; +}; + +struct SQLColumnPrivileges_params +{ + UINT64 StatementHandle; + UCHAR *CatalogName; + INT16 NameLength1; + UCHAR *SchemaName; + INT16 NameLength2; + UCHAR *TableName; + INT16 NameLength3; + UCHAR *ColumnName; + INT16 NameLength4; +}; + +struct SQLColumnPrivilegesW_params +{ + UINT64 StatementHandle; + WCHAR *CatalogName; + INT16 NameLength1; + WCHAR *SchemaName; + INT16 NameLength2; + WCHAR *TableName; + INT16 NameLength3; + WCHAR *ColumnName; + INT16 NameLength4; +}; + +struct SQLColumns_params +{ + UINT64 StatementHandle; + UCHAR *CatalogName; + INT16 NameLength1; + UCHAR *SchemaName; + INT16 NameLength2; + UCHAR *TableName; + INT16 NameLength3; + UCHAR *ColumnName; + INT16 NameLength4; +}; + +struct SQLColumnsW_params +{ + UINT64 StatementHandle; + WCHAR *CatalogName; + INT16 NameLength1; + WCHAR *SchemaName; + INT16 NameLength2; + WCHAR *TableName; + INT16 NameLength3; + WCHAR *ColumnName; + INT16 NameLength4; +}; + +struct SQLConnect_params +{ + UINT64 ConnectionHandle; + UCHAR *ServerName; + INT16 NameLength1; + UCHAR *UserName; + INT16 NameLength2; + UCHAR *Authentication; + INT16 NameLength3; +}; + +struct SQLConnectW_params +{ + UINT64 ConnectionHandle; + WCHAR *ServerName; + INT16 NameLength1; + WCHAR *UserName; + INT16 NameLength2; + WCHAR *Authentication; + INT16 NameLength3; +}; + +struct SQLCopyDesc_params +{ + UINT64 SourceDescHandle; + UINT64 TargetDescHandle; +}; + +struct SQLDataSources_params +{ + UINT64 EnvironmentHandle; + UINT16 Direction; + UCHAR *ServerName; + INT16 BufferLength1; + INT16 *NameLength1; + UCHAR *Description; + INT16 BufferLength2; + INT16 *NameLength2; +}; + +struct SQLDataSourcesW_params +{ + UINT64 EnvironmentHandle; + UINT16 Direction; + WCHAR *ServerName; + INT16 BufferLength1; + INT16 *NameLength1; + WCHAR *Description; + INT16 BufferLength2; + INT16 *NameLength2; +}; + +struct SQLDescribeCol_params +{ + UINT64 StatementHandle; + UINT16 ColumnNumber; + UCHAR *ColumnName; + INT16 BufferLength; + INT16 *NameLength; + INT16 *DataType; + UINT64 *ColumnSize; + INT16 *DecimalDigits; + INT16 *Nullable; +}; + +struct SQLDescribeColW_params +{ + UINT64 StatementHandle; + UINT16 ColumnNumber; + WCHAR *ColumnName; + INT16 BufferLength; + INT16 *NameLength; + INT16 *DataType; + UINT64 *ColumnSize; + INT16 *DecimalDigits; + INT16 *Nullable; +}; + +struct SQLDescribeParam_params +{ + UINT64 StatementHandle; + UINT16 ParameterNumber; + INT16 *DataType; + UINT64 *ParameterSize; + INT16 *DecimalDigits; + INT16 *Nullable; +}; + +struct SQLDisconnect_params +{ + UINT64 ConnectionHandle; +}; + +struct SQLDriverConnect_params +{ + UINT64 ConnectionHandle; + void *WindowHandle; + UCHAR *ConnectionString; + INT16 Length; + UCHAR *OutConnectionString; + INT16 BufferLength; + INT16 *Length2; + UINT16 DriverCompletion; +}; + +struct SQLDriverConnectW_params +{ + UINT64 ConnectionHandle; + void *WindowHandle; + WCHAR *InConnectionString; + INT16 Length; + WCHAR *OutConnectionString; + INT16 BufferLength; + INT16 *Length2; + UINT16 DriverCompletion; +}; + +struct SQLDrivers_params +{ + UINT64 EnvironmentHandle; + UINT16 Direction; + UCHAR *DriverDescription; + INT16 BufferLength1; + INT16 *DescriptionLength; + UCHAR *DriverAttributes; + INT16 BufferLength2; + INT16 *AttributesLength; +}; + +struct SQLDriversW_params +{ + UINT64 EnvironmentHandle; + UINT16 Direction; + WCHAR *DriverDescription; + INT16 BufferLength1; + INT16 *DescriptionLength; + WCHAR *DriverAttributes; + INT16 BufferLength2; + INT16 *AttributesLength; +}; + +struct SQLEndTran_params +{ + INT16 HandleType; + UINT64 Handle; + INT16 CompletionType; +}; + +struct SQLError_params +{ + UINT64 EnvironmentHandle; + UINT64 ConnectionHandle; + UINT64 StatementHandle; + UCHAR *SqlState; + INT32 *NativeError; + UCHAR *MessageText; + INT16 BufferLength; + INT16 *TextLength; +}; + +struct SQLErrorW_params +{ + UINT64 EnvironmentHandle; + UINT64 ConnectionHandle; + UINT64 StatementHandle; + WCHAR *SqlState; + INT32 *NativeError; + WCHAR *MessageText; + INT16 BufferLength; + INT16 *TextLength; +}; + +struct SQLExecDirect_params +{ + UINT64 StatementHandle; + UCHAR *StatementText; + INT32 TextLength; +}; + +struct SQLExecDirectW_params +{ + UINT64 StatementHandle; + WCHAR *StatementText; + INT32 TextLength; +}; + +struct SQLExecute_params +{ + UINT64 StatementHandle; +}; + +struct SQLExtendedFetch_params +{ + UINT64 StatementHandle; + UINT16 FetchOrientation; + INT64 FetchOffset; + UINT64 *RowCount; + UINT16 *RowStatusArray; +}; + +struct SQLFetch_params +{ + UINT64 StatementHandle; +}; + +struct SQLFetchScroll_params +{ + UINT64 StatementHandle; + INT16 FetchOrientation; + INT64 FetchOffset; +}; + +struct SQLForeignKeys_params +{ + UINT64 StatementHandle; + UCHAR *PkCatalogName; + INT16 NameLength1; + UCHAR *PkSchemaName; + INT16 NameLength2; + UCHAR *PkTableName; + INT16 NameLength3; + UCHAR *FkCatalogName; + INT16 NameLength4; + UCHAR *FkSchemaName; + INT16 NameLength5; + UCHAR *FkTableName; + INT16 NameLength6; +}; + +struct SQLForeignKeysW_params +{ + UINT64 StatementHandle; + WCHAR *PkCatalogName; + INT16 NameLength1; + WCHAR *PkSchemaName; + INT16 NameLength2; + WCHAR *PkTableName; + INT16 NameLength3; + WCHAR *FkCatalogName; + INT16 NameLength4; + WCHAR *FkSchemaName; + INT16 NameLength5; + WCHAR *FkTableName; + INT16 NameLength6; +}; + +struct SQLFreeConnect_params +{ + UINT64 ConnectionHandle; +}; + +struct SQLFreeEnv_params +{ + UINT64 EnvironmentHandle; +}; + +struct SQLFreeHandle_params +{ + INT16 HandleType; + UINT64 Handle; +}; + +struct SQLFreeStmt_params +{ + UINT64 StatementHandle; + UINT16 Option; +}; + +struct SQLGetConnectAttr_params +{ + UINT64 ConnectionHandle; + INT32 Attribute; + void *Value; + INT32 BufferLength; + INT32 *StringLength; +}; + +struct SQLGetConnectAttrW_params +{ + UINT64 ConnectionHandle; + INT32 Attribute; + void *Value; + INT32 BufferLength; + INT32 *StringLength; +}; + +struct SQLGetConnectOption_params +{ + UINT64 ConnectionHandle; + UINT16 Option; + void *Value; +}; + +struct SQLGetConnectOptionW_params +{ + UINT64 ConnectionHandle; + INT16 Option; + void *Value; +}; + +struct SQLGetCursorName_params +{ + UINT64 StatementHandle; + UCHAR *CursorName; + INT16 BufferLength; + INT16 *NameLength; +}; + +struct SQLGetCursorNameW_params +{ + UINT64 StatementHandle; + WCHAR *CursorName; + INT16 BufferLength; + INT16 *NameLength; +}; + +struct SQLGetData_params +{ + UINT64 StatementHandle; + UINT16 ColumnNumber; + INT16 TargetType; + void *TargetValue; + INT64 BufferLength; + INT64 *StrLen_or_Ind; +}; + +struct SQLGetDescField_params +{ + UINT64 DescriptorHandle; + INT16 RecNumber; + INT16 FieldIdentifier; + void *Value; + INT32 BufferLength; + INT32 *StringLength; +} +; +struct SQLGetDescFieldW_params +{ + UINT64 DescriptorHandle; + INT16 RecNumber; + INT16 FieldIdentifier; + void *Value; + INT32 BufferLength; + INT32 *StringLength; +}; + +struct SQLGetDescRec_params +{ + UINT64 DescriptorHandle; + INT16 RecNumber; + UCHAR *Name; + INT16 BufferLength; + INT16 *StringLength; + INT16 *Type; + INT16 *SubType; + INT64 *Length; + INT16 *Precision; + INT16 *Scale; + INT16 *Nullable; +}; + +struct SQLGetDescRecW_params +{ + UINT64 DescriptorHandle; + INT16 RecNumber; + WCHAR *Name; + INT16 BufferLength; + INT16 *StringLength; + INT16 *Type; + INT16 *SubType; + INT64 *Length; + INT16 *Precision; + INT16 *Scale; + INT16 *Nullable; +}; + +struct SQLGetDiagField_params +{ + INT16 HandleType; + UINT64 Handle; + INT16 RecNumber; + INT16 DiagIdentifier; + void *DiagInfo; + INT16 BufferLength; + INT16 *StringLength; +}; + +struct SQLGetDiagFieldW_params +{ + INT16 HandleType; + UINT64 Handle; + INT16 RecNumber; + INT16 DiagIdentifier; + void *DiagInfo; + INT16 BufferLength; + INT16 *StringLength; +}; + +struct SQLGetDiagRec_params +{ + INT16 HandleType; + UINT64 Handle; + INT16 RecNumber; + UCHAR *SqlState; + INT32 *NativeError; + UCHAR *MessageText; + INT16 BufferLength; + INT16 *TextLength; +}; + +struct SQLGetDiagRecW_params +{ + INT16 HandleType; + UINT64 Handle; + INT16 RecNumber; + WCHAR *SqlState; + INT32 *NativeError; + WCHAR *MessageText; + INT16 BufferLength; + INT16 *TextLength; +}; + +struct SQLGetEnvAttr_params +{ + UINT64 EnvironmentHandle; + INT32 Attribute; + void *Value; + INT32 BufferLength; + INT32 *StringLength; +}; + +struct SQLGetFunctions_params +{ + UINT64 ConnectionHandle; + UINT16 FunctionId; + UINT16 *Supported; +}; + +struct SQLGetInfo_params +{ + UINT64 ConnectionHandle; + UINT16 InfoType; + void *InfoValue; + INT16 BufferLength; + INT16 *StringLength; +}; + +struct SQLGetInfoW_params +{ + UINT64 ConnectionHandle; + UINT16 InfoType; + void *InfoValue; + INT16 BufferLength; + INT16 *StringLength; +}; + +struct SQLGetStmtAttr_params +{ + UINT64 StatementHandle; + INT32 Attribute; + void *Value; + INT32 BufferLength; + INT32 *StringLength; +}; + +struct SQLGetStmtAttrW_params +{ + UINT64 StatementHandle; + INT32 Attribute; + void *Value; + INT32 BufferLength; + INT32 *StringLength; +}; + +struct SQLGetStmtOption_params +{ + UINT64 StatementHandle; + UINT16 Option; + void *Value; +}; + +struct SQLGetTypeInfo_params +{ + UINT64 StatementHandle; + INT16 DataType; +}; + +struct SQLGetTypeInfoW_params +{ + UINT64 StatementHandle; + INT16 DataType; +}; + +struct SQLMoreResults_params +{ + UINT64 StatementHandle; +}; + +struct SQLNativeSql_params +{ + UINT64 ConnectionHandle; + UCHAR *InStatementText; + INT32 TextLength1; + UCHAR *OutStatementText; + INT32 BufferLength; + INT32 *TextLength2; +}; + +struct SQLNativeSqlW_params +{ + UINT64 ConnectionHandle; + WCHAR *InStatementText; + INT32 TextLength1; + WCHAR *OutStatementText; + INT32 BufferLength; + INT32 *TextLength2; +}; + +struct SQLNumParams_params +{ + UINT64 StatementHandle; + INT16 *ParameterCount; +}; + +struct SQLNumResultCols_params +{ + UINT64 StatementHandle; + INT16 *ColumnCount; +}; + +struct SQLParamData_params +{ + UINT64 StatementHandle; + void *Value; +}; + +struct SQLParamOptions_params +{ + UINT64 StatementHandle; + UINT64 RowCount; + UINT64 *RowNumber; +}; + +struct SQLPrepare_params +{ + UINT64 StatementHandle; + UCHAR *StatementText; + INT32 TextLength; +}; + +struct SQLPrepareW_params +{ + UINT64 StatementHandle; + WCHAR *StatementText; + INT32 TextLength; +}; + +struct SQLPrimaryKeys_params +{ + UINT64 StatementHandle; + UCHAR *CatalogName; + INT16 NameLength1; + UCHAR *SchemaName; + INT16 NameLength2; + UCHAR *TableName; + INT16 NameLength3; +}; + +struct SQLPrimaryKeysW_params +{ + UINT64 StatementHandle; + WCHAR *CatalogName; + INT16 NameLength1; + WCHAR *SchemaName; + INT16 NameLength2; + WCHAR *TableName; + INT16 NameLength3; +}; + +struct SQLProcedureColumns_params +{ + UINT64 StatementHandle; + UCHAR *CatalogName; + INT16 NameLength1; + UCHAR *SchemaName; + INT16 NameLength2; + UCHAR *ProcName; + INT16 NameLength3; + UCHAR *ColumnName; + INT16 NameLength4; +}; + +struct SQLProcedureColumnsW_params +{ + UINT64 StatementHandle; + WCHAR *CatalogName; + INT16 NameLength1; + WCHAR *SchemaName; + INT16 NameLength2; + WCHAR *ProcName; + INT16 NameLength3; + WCHAR *ColumnName; + INT16 NameLength4; +}; + +struct SQLProcedures_params +{ + UINT64 StatementHandle; + UCHAR *CatalogName; + INT16 NameLength1; + UCHAR *SchemaName; + INT16 NameLength2; + UCHAR *ProcName; + INT16 NameLength3; +}; + +struct SQLProceduresW_params +{ + UINT64 StatementHandle; + WCHAR *CatalogName; + INT16 NameLength1; + WCHAR *SchemaName; + INT16 NameLength2; + WCHAR *ProcName; + INT16 NameLength3; +}; + +struct SQLPutData_params +{ + UINT64 StatementHandle; + void *Data; + INT64 StrLen_or_Ind; +}; + +struct SQLRowCount_params +{ + UINT64 StatementHandle; + INT64 *RowCount; +}; + +struct SQLSetConnectAttr_params +{ + UINT64 ConnectionHandle; + INT32 Attribute; + void *Value; + INT32 StringLength; +}; + +struct SQLSetConnectAttrW_params +{ + UINT64 ConnectionHandle; + INT32 Attribute; + void *Value; + INT32 StringLength; +}; + +struct SQLSetConnectOption_params +{ + UINT64 ConnectionHandle; + UINT16 Option; + UINT64 Value; +}; + +struct SQLSetConnectOptionW_params +{ + UINT64 ConnectionHandle; + UINT16 Option; + UINT64 Value; +}; + +struct SQLSetCursorName_params +{ + UINT64 StatementHandle; + UCHAR *CursorName; + INT16 NameLength; +}; + +struct SQLSetCursorNameW_params +{ + UINT64 StatementHandle; + WCHAR *CursorName; + INT16 NameLength; +}; + +struct SQLSetDescField_params +{ + UINT64 DescriptorHandle; + INT16 RecNumber; + INT16 FieldIdentifier; + void *Value; + INT32 BufferLength; +}; + +struct SQLSetDescFieldW_params +{ + UINT64 DescriptorHandle; + INT16 RecNumber; + INT16 FieldIdentifier; + void *Value; + INT32 BufferLength; +}; + +struct SQLSetDescRec_params +{ + UINT64 DescriptorHandle; + INT16 RecNumber; + INT16 Type; + INT16 SubType; + INT64 Length; + INT16 Precision; + INT16 Scale; + void *Data; + INT64 *StringLength; + INT64 *Indicator; +}; + +struct SQLSetEnvAttr_params +{ + UINT64 EnvironmentHandle; + INT32 Attribute; + void *Value; + INT32 StringLength; +}; + +struct SQLSetParam_params +{ + UINT64 StatementHandle; + UINT16 ParameterNumber; + INT16 ValueType; + INT16 ParameterType; + UINT64 LengthPrecision; + INT16 ParameterScale; + void *ParameterValue; + INT64 *StrLen_or_Ind; +}; + +struct SQLSetPos_params +{ + UINT64 StatementHandle; + UINT64 RowNumber; + UINT16 Operation; + UINT16 LockType; +}; + +struct SQLSetScrollOptions_params +{ + UINT64 StatementHandle; + UINT16 Concurrency; + INT64 KeySetSize; + UINT16 RowSetSize; +}; + +struct SQLSetStmtAttr_params +{ + UINT64 StatementHandle; + INT32 Attribute; + void *Value; + INT32 StringLength; +}; + +struct SQLSetStmtAttrW_params +{ + UINT64 StatementHandle; + INT32 Attribute; + void *Value; + INT32 StringLength; +}; + +struct SQLSetStmtOption_params +{ + UINT64 StatementHandle; + UINT16 Option; + UINT64 Value; +}; + +struct SQLSpecialColumns_params +{ + UINT64 StatementHandle; + UINT16 IdentifierType; + UCHAR *CatalogName; + INT16 NameLength1; + UCHAR *SchemaName; + INT16 NameLength2; + UCHAR *TableName; + INT16 NameLength3; + UINT16 Scope; + UINT16 Nullable; +}; + +struct SQLSpecialColumnsW_params +{ + UINT64 StatementHandle; + UINT16 IdentifierType; + WCHAR *CatalogName; + INT16 NameLength1; + WCHAR *SchemaName; + INT16 NameLength2; + WCHAR *TableName; + INT16 NameLength3; + UINT16 Scope; + UINT16 Nullable; +}; + +struct SQLStatistics_params +{ + UINT64 StatementHandle; + UCHAR *CatalogName; + INT16 NameLength1; + UCHAR *SchemaName; + INT16 NameLength2; + UCHAR *TableName; + INT16 NameLength3; + UINT16 Unique; + UINT16 Reserved; +}; + +struct SQLStatisticsW_params +{ + UINT64 StatementHandle; + WCHAR *CatalogName; + INT16 NameLength1; + WCHAR *SchemaName; + INT16 NameLength2; + WCHAR *TableName; + INT16 NameLength3; + UINT16 Unique; + UINT16 Reserved; +}; + +struct SQLTablePrivileges_params +{ + UINT64 StatementHandle; + UCHAR *CatalogName; + INT16 NameLength1; + UCHAR *SchemaName; + INT16 NameLength2; + UCHAR *TableName; + INT16 NameLength3; +}; + +struct SQLTablePrivilegesW_params +{ + UINT64 StatementHandle; + WCHAR *CatalogName; + INT16 NameLength1; + WCHAR *SchemaName; + INT16 NameLength2; + WCHAR *TableName; + INT16 NameLength3; +}; + +struct SQLTables_params +{ + UINT64 StatementHandle; + UCHAR *CatalogName; + INT16 NameLength1; + UCHAR *SchemaName; + INT16 NameLength2; + UCHAR *TableName; + INT16 NameLength3; + UCHAR *TableType; + INT16 NameLength4; +}; + +struct SQLTablesW_params +{ + UINT64 StatementHandle; + WCHAR *CatalogName; + INT16 NameLength1; + WCHAR *SchemaName; + INT16 NameLength2; + WCHAR *TableName; + INT16 NameLength3; + WCHAR *TableType; + INT16 NameLength4; +}; + +struct SQLTransact_params +{ + UINT64 EnvironmentHandle; + UINT64 ConnectionHandle; + UINT16 CompletionType; +};
From: Hans Leidekker hans@codeweavers.com
--- dlls/odbc32/unixlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/odbc32/unixlib.c b/dlls/odbc32/unixlib.c index 3b94180c5bc..b9386a9d2a3 100644 --- a/dlls/odbc32/unixlib.c +++ b/dlls/odbc32/unixlib.c @@ -173,7 +173,7 @@ static NTSTATUS load_odbc(void);
static NTSTATUS odbc_process_attach( void *args ) { - if (!load_odbc()) return STATUS_DLL_NOT_FOUND; + if (load_odbc()) return STATUS_DLL_NOT_FOUND; return STATUS_SUCCESS; }
From: Hans Leidekker hans@codeweavers.com
--- dlls/odbc32/proxyodbc.c | 295 +--------------------------------------- dlls/odbc32/unixlib.c | 284 ++++++++++++++++++++++++++++++++++++++ dlls/odbc32/unixlib.h | 2 + 3 files changed, 288 insertions(+), 293 deletions(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index a3195afac5a..bb9e8fd1625 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -47,297 +47,6 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
#define ODBC_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params )
-/*********************************************************************** - * ODBC_ReplicateODBCInstToRegistry - * - * PARAMS - * - * RETURNS - * - * Utility to ODBC_ReplicateToRegistry to replicate the drivers of the - * ODBCINST.INI settings - * - * The driver settings are not replicated to the registry. If we were to - * replicate them we would need to decide whether to replicate all settings - * or to do some translation; whether to remove any entries present only in - * the windows registry, etc. - */ - -static void ODBC_ReplicateODBCInstToRegistry (SQLHENV hEnv) -{ - HKEY hODBCInst; - LONG reg_ret; - BOOL success; - - success = FALSE; - TRACE ("Driver settings are not currently replicated to the registry\n"); - if ((reg_ret = RegCreateKeyExA (HKEY_LOCAL_MACHINE, - "Software\ODBC\ODBCINST.INI", 0, NULL, - REG_OPTION_NON_VOLATILE, - KEY_ALL_ACCESS /* a couple more than we need */, NULL, - &hODBCInst, NULL)) == ERROR_SUCCESS) - { - HKEY hDrivers; - if ((reg_ret = RegCreateKeyExA (hODBCInst, "ODBC Drivers", 0, - NULL, REG_OPTION_NON_VOLATILE, - KEY_ALL_ACCESS /* overkill */, NULL, &hDrivers, NULL)) - == ERROR_SUCCESS) - { - SQLRETURN sql_ret; - SQLUSMALLINT dirn; - CHAR desc [256]; - SQLSMALLINT sizedesc; - - success = TRUE; - dirn = SQL_FETCH_FIRST; - while ((sql_ret = SQLDrivers (hEnv, dirn, (SQLCHAR*)desc, sizeof(desc), - &sizedesc, NULL, 0, NULL)) == SQL_SUCCESS || - sql_ret == SQL_SUCCESS_WITH_INFO) - { - /* FIXME Do some proper handling of the SUCCESS_WITH_INFO */ - dirn = SQL_FETCH_NEXT; - if (sizedesc == lstrlenA(desc)) - { - HKEY hThis; - if ((reg_ret = RegQueryValueExA (hDrivers, desc, NULL, - NULL, NULL, NULL)) == ERROR_FILE_NOT_FOUND) - { - if ((reg_ret = RegSetValueExA (hDrivers, desc, 0, - REG_SZ, (const BYTE *)"Installed", 10)) != ERROR_SUCCESS) - { - TRACE ("Error %ld replicating driver %s\n", - reg_ret, desc); - success = FALSE; - } - } - else if (reg_ret != ERROR_SUCCESS) - { - TRACE ("Error %ld checking for %s in drivers\n", - reg_ret, desc); - success = FALSE; - } - if ((reg_ret = RegCreateKeyExA (hODBCInst, desc, 0, - NULL, REG_OPTION_NON_VOLATILE, - KEY_ALL_ACCESS, NULL, &hThis, NULL)) - == ERROR_SUCCESS) - { - /* FIXME This is where the settings go. - * I suggest that if the disposition says it - * exists then we leave it alone. Alternatively - * include an extra value to flag that it is - * a replication of the unixODBC/iODBC/... - */ - if ((reg_ret = RegCloseKey (hThis)) != - ERROR_SUCCESS) - TRACE ("Error %ld closing %s key\n", reg_ret, - desc); - } - else - { - TRACE ("Error %ld ensuring driver key %s\n", - reg_ret, desc); - success = FALSE; - } - } - else - { - WARN ("Unusually long driver name %s not replicated\n", - desc); - success = FALSE; - } - } - if (sql_ret != SQL_NO_DATA) - { - TRACE ("Error %d enumerating drivers\n", (int)sql_ret); - success = FALSE; - } - if ((reg_ret = RegCloseKey (hDrivers)) != ERROR_SUCCESS) - { - TRACE ("Error %ld closing hDrivers\n", reg_ret); - } - } - else - { - TRACE ("Error %ld opening HKLM\S\O\OI\Drivers\n", reg_ret); - } - if ((reg_ret = RegCloseKey (hODBCInst)) != ERROR_SUCCESS) - { - TRACE ("Error %ld closing HKLM\S\O\ODBCINST.INI\n", reg_ret); - } - } - else - { - TRACE ("Error %ld opening HKLM\S\O\ODBCINST.INI\n", reg_ret); - } - if (!success) - { - WARN ("May not have replicated all ODBC drivers to the registry\n"); - } -} - -/*********************************************************************** - * ODBC_ReplicateODBCToRegistry - * - * PARAMS - * - * RETURNS - * - * Utility to ODBC_ReplicateToRegistry to replicate either the USER or - * SYSTEM dsns - * - * For now simply place the "Driver description" (as returned by SQLDataSources) - * into the registry as the driver. This is enough to satisfy Crystal's - * requirement that there be a driver entry. (It doesn't seem to care what - * the setting is). - * A slightly more accurate setting would be to access the registry to find - * the actual driver library for the given description (which appears to map - * to one of the HKLM/Software/ODBC/ODBCINST.INI keys). (If you do this note - * that this will add a requirement that this function be called after - * ODBC_ReplicateODBCInstToRegistry) - */ -static void ODBC_ReplicateODBCToRegistry (BOOL is_user, SQLHENV hEnv) -{ - HKEY hODBC; - LONG reg_ret; - SQLRETURN sql_ret; - SQLUSMALLINT dirn; - CHAR dsn [SQL_MAX_DSN_LENGTH + 1]; - SQLSMALLINT sizedsn; - CHAR desc [256]; - SQLSMALLINT sizedesc; - BOOL success; - const char *which = is_user ? "user" : "system"; - - success = FALSE; - if ((reg_ret = RegCreateKeyExA ( - is_user ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE, - "Software\ODBC\ODBC.INI", 0, NULL, REG_OPTION_NON_VOLATILE, - KEY_ALL_ACCESS /* a couple more than we need */, NULL, &hODBC, - NULL)) == ERROR_SUCCESS) - { - success = TRUE; - dirn = is_user ? SQL_FETCH_FIRST_USER : SQL_FETCH_FIRST_SYSTEM; - while ((sql_ret = SQLDataSources (hEnv, dirn, - (SQLCHAR*)dsn, sizeof(dsn), &sizedsn, - (SQLCHAR*)desc, sizeof(desc), &sizedesc)) == SQL_SUCCESS - || sql_ret == SQL_SUCCESS_WITH_INFO) - { - /* FIXME Do some proper handling of the SUCCESS_WITH_INFO */ - dirn = SQL_FETCH_NEXT; - if (sizedsn == lstrlenA(dsn) && sizedesc == lstrlenA(desc)) - { - HKEY hDSN; - if ((reg_ret = RegCreateKeyExA (hODBC, dsn, 0, - NULL, REG_OPTION_NON_VOLATILE, - KEY_ALL_ACCESS, NULL, &hDSN, NULL)) - == ERROR_SUCCESS) - { - static const char DRIVERKEY[] = "Driver"; - if ((reg_ret = RegQueryValueExA (hDSN, DRIVERKEY, - NULL, NULL, NULL, NULL)) - == ERROR_FILE_NOT_FOUND) - { - if ((reg_ret = RegSetValueExA (hDSN, DRIVERKEY, 0, - REG_SZ, (LPBYTE)desc, sizedesc)) != ERROR_SUCCESS) - { - TRACE ("Error %ld replicating description of " - "%s(%s)\n", reg_ret, dsn, desc); - success = FALSE; - } - } - else if (reg_ret != ERROR_SUCCESS) - { - TRACE ("Error %ld checking for description of %s\n", - reg_ret, dsn); - success = FALSE; - } - if ((reg_ret = RegCloseKey (hDSN)) != ERROR_SUCCESS) - { - TRACE ("Error %ld closing %s DSN key %s\n", - reg_ret, which, dsn); - } - } - else - { - TRACE ("Error %ld opening %s DSN key %s\n", - reg_ret, which, dsn); - success = FALSE; - } - } - else - { - WARN ("Unusually long %s data source name %s (%s) not " - "replicated\n", which, dsn, desc); - success = FALSE; - } - } - if (sql_ret != SQL_NO_DATA) - { - TRACE ("Error %d enumerating %s datasources\n", - (int)sql_ret, which); - success = FALSE; - } - if ((reg_ret = RegCloseKey (hODBC)) != ERROR_SUCCESS) - { - TRACE ("Error %ld closing %s ODBC.INI registry key\n", reg_ret, - which); - } - } - else - { - TRACE ("Error %ld creating/opening %s ODBC.INI registry key\n", - reg_ret, which); - } - if (!success) - { - WARN ("May not have replicated all %s ODBC DSNs to the registry\n", - which); - } -} - -/*********************************************************************** - * ODBC_ReplicateToRegistry - * - * PARAMS - * - * RETURNS - * - * Unfortunately some of the functions that Windows documents as being part - * of the ODBC API it implements directly during compilation or something - * in terms of registry access functions. - * e.g. SQLGetInstalledDrivers queries the list at - * HKEY_LOCAL_MACHINE\Software\ODBC\ODBCINST.INI\ODBC Drivers - * - * This function is called when the driver manager is loaded and is used - * to replicate the appropriate details into the Wine registry - */ - -static void ODBC_ReplicateToRegistry (void) -{ - SQLRETURN sql_ret; - SQLHENV hEnv; - - if ((sql_ret = SQLAllocEnv(&hEnv)) == SQL_SUCCESS) - { - ODBC_ReplicateODBCInstToRegistry (hEnv); - ODBC_ReplicateODBCToRegistry (FALSE /* system dsns */, hEnv); - ODBC_ReplicateODBCToRegistry (TRUE /* user dsns */, hEnv); - - if ((sql_ret = SQLFreeEnv(hEnv)) != SQL_SUCCESS) - { - TRACE ("Error %d freeing the SQL environment.\n", (int)sql_ret); - } - } - else - { - TRACE ("Error %d opening an SQL environment.\n", (int)sql_ret); - WARN ("The external ODBC settings have not been replicated to the" - " Wine registry\n"); - } -} - -#define SUCCESS(ret) (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) - /************************************************************************* * SQLAllocConnect [ODBC32.001] */ @@ -3212,9 +2921,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved) { case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hinstDLL); - if (!__wine_init_unix_call() && !WINE_UNIX_CALL( process_attach, NULL )) + if (!__wine_init_unix_call()) { - ODBC_ReplicateToRegistry(); + if (WINE_UNIX_CALL( process_attach, NULL )) __wine_unixlib_handle = 0; } break;
diff --git a/dlls/odbc32/unixlib.c b/dlls/odbc32/unixlib.c index b9386a9d2a3..aed3db41b02 100644 --- a/dlls/odbc32/unixlib.c +++ b/dlls/odbc32/unixlib.c @@ -48,6 +48,7 @@ #include "unixlib.h" #include "wine/debug.h"
+WINE_DEFAULT_DEBUG_CHANNEL(odbc); WINE_DECLARE_DEBUG_CHANNEL(winediag);
static void *libodbc; @@ -168,12 +169,295 @@ static SQLRETURN (*pSQLTables)(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLIN static SQLRETURN (*pSQLTablesW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); static SQLRETURN (*pSQLTransact)(SQLHENV,SQLHDBC,SQLUSMALLINT);
+static inline void init_unicode_string( UNICODE_STRING *str, const WCHAR *data, ULONG data_size ) +{ + str->Length = str->MaximumLength = data_size; + str->Buffer = (WCHAR *)data; +} + +static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len ) +{ + while (len--) *dst++ = (unsigned char)*src++; +} + +static HANDLE create_hkcu_key( const WCHAR *path, ULONG path_size ) +{ + NTSTATUS status; + char buffer[512 + ARRAY_SIZE("\Registry\User\")]; + WCHAR bufferW[512 + ARRAY_SIZE("\Registry\User\")]; + DWORD_PTR sid_data[(sizeof(TOKEN_USER) + SECURITY_MAX_SID_SIZE) / sizeof(DWORD_PTR)]; + DWORD i, len = sizeof(sid_data); + SID *sid; + UNICODE_STRING str; + OBJECT_ATTRIBUTES attr; + HANDLE ret; + + status = NtQueryInformationToken( GetCurrentThreadEffectiveToken(), TokenUser, sid_data, len, &len ); + if (status) return NULL; + + sid = ((TOKEN_USER *)sid_data)->User.Sid; + len = snprintf( buffer, sizeof(buffer), "\Registry\User\S-%u-%u", sid->Revision, + (int)MAKELONG( MAKEWORD( sid->IdentifierAuthority.Value[5], sid->IdentifierAuthority.Value[4] ), + MAKEWORD( sid->IdentifierAuthority.Value[3], sid->IdentifierAuthority.Value[2] ))); + for (i = 0; i < sid->SubAuthorityCount; i++) + len += snprintf( buffer + len, sizeof(buffer) - len, "-%u", (int)sid->SubAuthority[i] ); + buffer[len++] = '\'; + + ascii_to_unicode( bufferW, buffer, len ); + memcpy( bufferW + len, path, path_size ); + init_unicode_string( &str, bufferW, len * sizeof(WCHAR) + path_size ); + InitializeObjectAttributes( &attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL ); + if (!NtCreateKey( &ret, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL )) return ret; + return NULL; +} + +static HANDLE create_hklm_key( const WCHAR *path, ULONG path_size ) +{ + static const WCHAR machineW[] = {'\','R','e','g','i','s','t','r','y','\','M','a','c','h','i','n','e','\'}; + OBJECT_ATTRIBUTES attr; + UNICODE_STRING str; + WCHAR bufferW[256 + ARRAY_SIZE(machineW)]; + HANDLE ret; + + memcpy( bufferW, machineW, sizeof(machineW) ); + memcpy( bufferW + ARRAY_SIZE(machineW), path, path_size ); + init_unicode_string( &str, bufferW, sizeof(machineW) + path_size ); + InitializeObjectAttributes( &attr, &str, OBJ_CASE_INSENSITIVE, 0, NULL ); + if (!NtCreateKey( &ret, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL )) return ret; + return NULL; +} + +static HANDLE create_key( HANDLE root, const WCHAR *path, ULONG path_size, ULONG options, ULONG *disposition ) +{ + UNICODE_STRING name = { path_size, path_size, (WCHAR *)path }; + OBJECT_ATTRIBUTES attr; + HANDLE ret; + + attr.Length = sizeof(attr); + attr.RootDirectory = root; + attr.ObjectName = &name; + attr.Attributes = 0; + attr.SecurityDescriptor = NULL; + attr.SecurityQualityOfService = NULL; + if (NtCreateKey( &ret, MAXIMUM_ALLOWED, &attr, 0, NULL, options, disposition )) return NULL; + return ret; +} + +static ULONG query_value( HANDLE key, const WCHAR *name, ULONG name_size, KEY_VALUE_PARTIAL_INFORMATION *info, + ULONG size ) +{ + UNICODE_STRING str = { name_size, name_size, (WCHAR *)name }; + if (NtQueryValueKey( key, &str, KeyValuePartialInformation, info, size, &size )) return 0; + return size - FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data); +} + +static BOOL set_value( HANDLE key, const WCHAR *name, ULONG name_size, ULONG type, const void *value, ULONG count ) +{ + UNICODE_STRING str = { name_size, name_size, (WCHAR *)name }; + return !NtSetValueKey( key, &str, 0, type, value, count ); +} + +/*********************************************************************** + * odbc_replicate_odbcinst_to_registry + * + * Utility to odbc_replicate_odbcinst_to_registry() to replicate the drivers of the + * ODBCINST.INI settings + * + * The driver settings are not replicated to the registry. If we were to + * replicate them we would need to decide whether to replicate all settings + * or to do some translation; whether to remove any entries present only in + * the windows registry, etc. + */ +static void replicate_odbcinst_to_registry( SQLHENV env ) +{ + static const WCHAR odbcW[] = {'S','o','f','t','w','a','r','e','\','O','D','B','C'}; + static const WCHAR odbcinstW[] = {'O','D','B','C','I','N','S','T','.','I','N','I'}; + static const WCHAR driversW[] = {'O','D','B','C',' ','D','r','i','v','e','r','s'}; + HANDLE key_odbc, key_odbcinst, key_drivers; + BOOL success = FALSE; + + if (!(key_odbc = create_hklm_key( odbcW, sizeof(odbcW) ))) return; + + if ((key_odbcinst = create_key( key_odbc, odbcinstW, sizeof(odbcinstW), 0, NULL ))) + { + if ((key_drivers = create_key( key_odbcinst, driversW, sizeof(driversW), 0, NULL ))) + { + SQLRETURN ret; + SQLUSMALLINT dir = SQL_FETCH_FIRST; + WCHAR desc [256]; + SQLSMALLINT len; + + success = TRUE; + while (SUCCESS((ret = pSQLDriversW( env, dir, (SQLWCHAR *)desc, sizeof(desc), &len, NULL, 0, NULL )))) + { + dir = SQL_FETCH_NEXT; + if (len == lstrlenW( desc )) + { + static const WCHAR installedW[] = {'I','n','s','t','a','l','l','e','d',0}; + HANDLE key_driver; + WCHAR buffer[256]; + KEY_VALUE_PARTIAL_INFORMATION *info = (void *)buffer; + + if (!query_value( key_drivers, desc, len * sizeof(WCHAR), info, sizeof(buffer) )) + { + if (!set_value( key_drivers, desc, len * sizeof(WCHAR), REG_SZ, (const BYTE *)installedW, + sizeof(installedW) )) + { + TRACE( "error replicating driver %s\n", debugstr_w(desc) ); + success = FALSE; + } + } + if ((key_driver = create_key( key_odbcinst, desc, lstrlenW( desc ) * sizeof(WCHAR), 0, NULL ))) + NtClose( key_driver ); + else + { + TRACE( "error ensuring driver key %s\n", debugstr_w(desc) ); + success = FALSE; + } + } + else + { + WARN( "unusually long driver name %s not replicated\n", debugstr_w(desc) ); + success = FALSE; + } + } + NtClose( key_drivers ); + } + else TRACE( "error opening Drivers key\n" ); + + NtClose( key_odbcinst ); + } + else TRACE( "error creating/opening ODBCINST.INI key\n" ); + + if (!success) WARN( "may not have replicated all ODBC drivers to the registry\n" ); + NtClose( key_odbc ); +} + +/*********************************************************************** + * replicate_odbc_to_registry + * + * Utility to replicate_to_registry() to replicate either the USER or + * SYSTEM data sources. + * + * For now simply place the "Driver description" (as returned by SQLDataSources) + * into the registry as the driver. This is enough to satisfy Crystal's + * requirement that there be a driver entry. (It doesn't seem to care what + * the setting is). + * A slightly more accurate setting would be to access the registry to find + * the actual driver library for the given description (which appears to map + * to one of the HKLM/Software/ODBC/ODBCINST.INI keys). (If you do this note + * that this will add a requirement that this function be called after + * replicate_odbcinst_to_registry()) + */ +static void replicate_odbc_to_registry( BOOL is_user, SQLHENV env ) +{ + static const WCHAR odbcW[] = {'S','o','f','t','w','a','r','e','\','O','D','B','C'}; + static const WCHAR odbciniW[] = {'O','D','B','C','.','I','N','I'}; + HANDLE key_odbc, key_odbcini, key_source; + SQLRETURN ret; + SQLUSMALLINT dir; + WCHAR dsn[SQL_MAX_DSN_LENGTH + 1], desc[256]; + SQLSMALLINT len_dsn, len_desc; + BOOL success = FALSE; + const char *which; + + if (is_user) + { + key_odbc = create_hkcu_key( odbcW, sizeof(odbcW) ); + which = "user"; + } + else + { + key_odbc = create_hklm_key( odbcW, sizeof(odbcW) ); + which = "system"; + } + if (!key_odbc) return; + + if ((key_odbcini = create_key( key_odbc, odbciniW, sizeof(odbciniW), 0, NULL ))) + { + success = TRUE; + dir = is_user ? SQL_FETCH_FIRST_USER : SQL_FETCH_FIRST_SYSTEM; + while (SUCCESS((ret = pSQLDataSourcesW( env, dir, (SQLWCHAR *)dsn, sizeof(dsn), &len_dsn, (SQLWCHAR *)desc, + sizeof(desc), &len_desc )))) + { + dir = SQL_FETCH_NEXT; + if (len_dsn == lstrlenW( dsn ) && len_desc == lstrlenW( desc )) + { + if ((key_source = create_key( key_odbcini, dsn, len_dsn * sizeof(WCHAR), 0, NULL ))) + { + static const WCHAR driverW[] = {'D','r','i','v','e','r'}; + WCHAR buffer[256]; + KEY_VALUE_PARTIAL_INFORMATION *info = (void *)buffer; + ULONG size; + + if (!(size = query_value( key_source, driverW, sizeof(driverW), info, sizeof(buffer) ))) + { + if (!set_value( key_source, driverW, sizeof(driverW), REG_SZ, (const BYTE *)desc, + len_desc * sizeof(WCHAR) )) + { + TRACE( "error replicating description of %s (%s)\n", debugstr_w(dsn), debugstr_w(desc) ); + success = FALSE; + } + } + NtClose( key_source ); + } + else + { + TRACE( "error opening %s DSN key %s\n", which, debugstr_w(dsn) ); + success = FALSE; + } + } + else + { + WARN( "unusually long %s data source name %s (%s) not replicated\n", which, debugstr_w(dsn), debugstr_w(desc) ); + success = FALSE; + } + } + NtClose( key_odbcini ); + } + else TRACE( "error creating/opening %s ODBC.INI registry key\n", which ); + + if (!success) WARN( "may not have replicated all %s ODBC DSNs to the registry\n", which ); + NtClose( key_odbc ); +} + +/*********************************************************************** + * replicate_to_registry + * + * Unfortunately some of the functions that Windows documents as being part + * of the ODBC API it implements directly during compilation or something + * in terms of registry access functions. + * e.g. SQLGetInstalledDrivers queries the list at + * HKEY_LOCAL_MACHINE\Software\ODBC\ODBCINST.INI\ODBC Drivers + * + * This function is called when the driver manager is loaded and is used + * to replicate the appropriate details into the Wine registry + */ +static void replicate_to_registry(void) +{ + SQLHENV env; + SQLRETURN ret; + + if (!(ret = pSQLAllocEnv( &env ))) + { + replicate_odbcinst_to_registry( env ); + replicate_odbc_to_registry( FALSE /* system dsn */, env ); + replicate_odbc_to_registry( TRUE /* user dsn */, env ); + pSQLFreeEnv( env ); + } + else + { + TRACE( "error %d opening an SQL environment\n", (int)ret ); + WARN( "external ODBC settings have not been replicated to the Wine registry\n" ); + } +}
static NTSTATUS load_odbc(void);
static NTSTATUS odbc_process_attach( void *args ) { if (load_odbc()) return STATUS_DLL_NOT_FOUND; + replicate_to_registry(); return STATUS_SUCCESS; }
diff --git a/dlls/odbc32/unixlib.h b/dlls/odbc32/unixlib.h index f2e6f00284f..88e76712328 100644 --- a/dlls/odbc32/unixlib.h +++ b/dlls/odbc32/unixlib.h @@ -29,6 +29,8 @@ #include "winbase.h" #include "wine/unixlib.h"
+#define SUCCESS(ret) (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) + enum sql_funcs { process_attach,
From: Hans Leidekker hans@codeweavers.com
--- dlls/odbc32/unixlib.c | 2405 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2405 insertions(+)
diff --git a/dlls/odbc32/unixlib.c b/dlls/odbc32/unixlib.c index aed3db41b02..ee5605d1d73 100644 --- a/dlls/odbc32/unixlib.c +++ b/dlls/odbc32/unixlib.c @@ -1635,6 +1635,2411 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
C_ASSERT( ARRAYSIZE( __wine_unix_call_funcs) == unix_funcs_count );
+#ifdef _WIN64 + +typedef ULONG PTR32; + +static NTSTATUS wow64_SQLBindCol( void *args ) +{ + struct + { + UINT64 StatementHandle; + INT16 ColumnNumber; + INT16 TargetType; + PTR32 TargetValue; + INT64 BufferLength; + PTR32 StrLen_or_Ind; + } const *params32 = args; + + struct SQLBindCol_params params = + { + params32->StatementHandle, + params32->ColumnNumber, + params32->TargetType, + ULongToPtr(params32->TargetValue), + params32->BufferLength, + ULongToPtr(params32->StrLen_or_Ind) + }; + + return wrap_SQLBindCol( ¶ms ); +} + +static NTSTATUS wow64_SQLBindParam( void *args ) +{ + struct + { + UINT64 StatementHandle; + UINT16 ParameterNumber; + INT16 ValueType; + INT16 ParameterType; + UINT64 LengthPrecision; + INT16 ParameterScale; + PTR32 ParameterValue; + PTR32 StrLen_or_Ind; + } const *params32 = args; + + struct SQLBindParam_params params = + { + params32->StatementHandle, + params32->ParameterNumber, + params32->ValueType, + params32->ParameterType, + params32->LengthPrecision, + params32->ParameterScale, + ULongToPtr(params32->ParameterValue), + ULongToPtr(params32->StrLen_or_Ind) + }; + + return wrap_SQLBindParam( ¶ms ); +} + +static NTSTATUS wow64_SQLBindParameter( void *args ) +{ + struct + { + UINT64 StatementHandle; + UINT16 ParameterNumber; + INT16 InputOutputType; + INT16 ValueType; + INT16 ParameterType; + UINT64 ColumnSize; + INT16 DecimalDigits; + PTR32 ParameterValue; + INT64 BufferLength; + PTR32 StrLen_or_Ind; + } const *params32 = args; + + struct SQLBindParameter_params params = + { + params32->StatementHandle, + params32->ParameterNumber, + params32->InputOutputType, + params32->ValueType, + params32->ParameterType, + params32->ColumnSize, + params32->DecimalDigits, + ULongToPtr(params32->ParameterValue), + params32->BufferLength, + ULongToPtr(params32->StrLen_or_Ind) + }; + + return wrap_SQLBindParameter( ¶ms ); +} + +static NTSTATUS wow64_SQLBrowseConnect( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + PTR32 InConnectionString; + INT16 StringLength1; + PTR32 OutConnectionString; + INT16 BufferLength; + PTR32 StringLength2; + } const *params32 = args; + + struct SQLBrowseConnect_params params = + { + params32->ConnectionHandle, + ULongToPtr(params32->InConnectionString), + params32->StringLength1, + ULongToPtr(params32->OutConnectionString), + params32->BufferLength, + ULongToPtr(params32->StringLength2) + }; + + return wrap_SQLBrowseConnect( ¶ms ); +} + +static NTSTATUS wow64_SQLBrowseConnectW( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + PTR32 InConnectionString; + INT16 StringLength1; + PTR32 OutConnectionString; + INT16 BufferLength; + PTR32 StringLength2; + } const *params32 = args; + + struct SQLBrowseConnectW_params params = + { + params32->ConnectionHandle, + ULongToPtr(params32->InConnectionString), + params32->StringLength1, + ULongToPtr(params32->OutConnectionString), + params32->BufferLength, + ULongToPtr(params32->StringLength2) + }; + + return wrap_SQLBrowseConnectW( ¶ms ); +} + +static NTSTATUS wow64_SQLColAttribute( void *args ) +{ + struct + { + UINT64 StatementHandle; + UINT16 ColumnNumber; + UINT16 FieldIdentifier; + PTR32 CharacterAttribute; + INT16 BufferLength; + PTR32 StringLength; + PTR32 NumericAttribute; + } const *params32 = args; + + struct SQLColAttribute_params params = + { + params32->StatementHandle, + params32->ColumnNumber, + params32->FieldIdentifier, + ULongToPtr(params32->CharacterAttribute), + params32->BufferLength, + ULongToPtr(params32->StringLength), + ULongToPtr(params32->NumericAttribute) + }; + + return wrap_SQLColAttribute( ¶ms ); +} + +static NTSTATUS wow64_SQLColAttributeW( void *args ) +{ + struct + { + UINT64 StatementHandle; + UINT16 ColumnNumber; + UINT16 FieldIdentifier; + PTR32 CharacterAttribute; + INT16 BufferLength; + PTR32 StringLength; + PTR32 NumericAttribute; + } const *params32 = args; + + struct SQLColAttributeW_params params = + { + params32->StatementHandle, + params32->ColumnNumber, + params32->FieldIdentifier, + ULongToPtr(params32->CharacterAttribute), + params32->BufferLength, + ULongToPtr(params32->StringLength), + ULongToPtr(params32->NumericAttribute) + }; + + return wrap_SQLColAttributeW( ¶ms ); +} + +static NTSTATUS wow64_SQLColAttributes( void *args ) +{ + struct + { + UINT64 StatementHandle; + UINT16 ColumnNumber; + UINT16 FieldIdentifier; + PTR32 CharacterAttributes; + INT16 BufferLength; + PTR32 StringLength; + PTR32 NumericAttributes; + } const *params32 = args; + + struct SQLColAttributes_params params = + { + params32->StatementHandle, + params32->ColumnNumber, + params32->FieldIdentifier, + ULongToPtr(params32->CharacterAttributes), + params32->BufferLength, + ULongToPtr(params32->StringLength), + ULongToPtr(params32->NumericAttributes) + }; + + return wrap_SQLColAttributes( ¶ms ); +} + +static NTSTATUS wow64_SQLColAttributesW( void *args ) +{ + struct + { + UINT64 StatementHandle; + UINT16 ColumnNumber; + UINT16 FieldIdentifier; + PTR32 CharacterAttributes; + INT16 BufferLength; + PTR32 StringLength; + PTR32 NumericAttributes; + } const *params32 = args; + + struct SQLColAttributesW_params params = + { + params32->StatementHandle, + params32->ColumnNumber, + params32->FieldIdentifier, + ULongToPtr(params32->CharacterAttributes), + params32->BufferLength, + ULongToPtr(params32->StringLength), + ULongToPtr(params32->NumericAttributes) + }; + + return wrap_SQLColAttributesW( ¶ms ); +} + +static NTSTATUS wow64_SQLColumnPrivileges( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + PTR32 ColumnName; + INT16 NameLength4; + } const *params32 = args; + + struct SQLColumnPrivileges_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3, + ULongToPtr(params32->ColumnName), + params32->NameLength4 + }; + + return wrap_SQLColumnPrivileges( ¶ms ); +} + +static NTSTATUS wow64_SQLColumnPrivilegesW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + PTR32 ColumnName; + INT16 NameLength4; + } const *params32 = args; + + struct SQLColumnPrivilegesW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3, + ULongToPtr(params32->ColumnName), + params32->NameLength4 + }; + + return wrap_SQLColumnPrivilegesW( ¶ms ); +} + +static NTSTATUS wow64_SQLColumns( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + PTR32 ColumnName; + INT16 NameLength4; + } const *params32 = args; + + struct SQLColumns_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3, + ULongToPtr(params32->ColumnName), + params32->NameLength4 + }; + + return wrap_SQLColumns( ¶ms ); +} + +static NTSTATUS wow64_SQLColumnsW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + PTR32 ColumnName; + INT16 NameLength4; + } const *params32 = args; + + struct SQLColumnsW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3, + ULongToPtr(params32->ColumnName), + params32->NameLength4 + }; + + return wrap_SQLColumnsW( ¶ms ); +} + +static NTSTATUS wow64_SQLConnect( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + PTR32 ServerName; + INT16 NameLength1; + PTR32 UserName; + INT16 NameLength2; + PTR32 Authentication; + INT16 NameLength3; + } const *params32 = args; + + struct SQLConnect_params params = + { + params32->ConnectionHandle, + ULongToPtr(params32->ServerName), + params32->NameLength1, + ULongToPtr(params32->UserName), + params32->NameLength2, + ULongToPtr(params32->Authentication), + params32->NameLength3 + }; + + return wrap_SQLConnect( ¶ms ); +} + +static NTSTATUS wow64_SQLConnectW( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + PTR32 ServerName; + INT16 NameLength1; + PTR32 UserName; + INT16 NameLength2; + PTR32 Authentication; + INT16 NameLength3; + } const *params32 = args; + + struct SQLConnectW_params params = + { + params32->ConnectionHandle, + ULongToPtr(params32->ServerName), + params32->NameLength1, + ULongToPtr(params32->UserName), + params32->NameLength2, + ULongToPtr(params32->Authentication), + params32->NameLength3 + }; + + return wrap_SQLConnectW( ¶ms ); +} + +static NTSTATUS wow64_SQLDataSources( void *args ) +{ + struct + { + UINT64 EnvironmentHandle; + UINT16 Direction; + PTR32 ServerName; + INT16 BufferLength1; + PTR32 NameLength1; + PTR32 Description; + INT16 BufferLength2; + PTR32 NameLength2; + } const *params32 = args; + + struct SQLDataSources_params params = + { + params32->EnvironmentHandle, + params32->Direction, + ULongToPtr(params32->ServerName), + params32->BufferLength1, + ULongToPtr(params32->NameLength1), + ULongToPtr(params32->Description), + params32->BufferLength2, + ULongToPtr(params32->NameLength2) + }; + + return wrap_SQLDataSources( ¶ms ); +} + +static NTSTATUS wow64_SQLDataSourcesW( void *args ) +{ + struct + { + UINT64 EnvironmentHandle; + UINT16 Direction; + PTR32 ServerName; + INT16 BufferLength1; + PTR32 NameLength1; + PTR32 Description; + INT16 BufferLength2; + PTR32 NameLength2; + } const *params32 = args; + + struct SQLDataSourcesW_params params = + { + params32->EnvironmentHandle, + params32->Direction, + ULongToPtr(params32->ServerName), + params32->BufferLength1, + ULongToPtr(params32->NameLength1), + ULongToPtr(params32->Description), + params32->BufferLength2, + ULongToPtr(params32->NameLength2) + }; + + return wrap_SQLDataSourcesW( ¶ms ); +} + +static NTSTATUS wow64_SQLDescribeCol( void *args ) +{ + struct + { + UINT64 StatementHandle; + INT16 ColumnNumber; + PTR32 ColumnName; + INT16 BufferLength; + PTR32 NameLength; + PTR32 DataType; + PTR32 ColumnSize; + PTR32 DecimalDigits; + PTR32 Nullable; + } const *params32 = args; + + struct SQLDescribeCol_params params = + { + params32->StatementHandle, + params32->ColumnNumber, + ULongToPtr(params32->ColumnName), + params32->BufferLength, + ULongToPtr(params32->NameLength), + ULongToPtr(params32->DataType), + ULongToPtr(params32->ColumnSize), + ULongToPtr(params32->DecimalDigits), + ULongToPtr(params32->Nullable) + }; + + return wrap_SQLDescribeCol( ¶ms ); +} + +static NTSTATUS wow64_SQLDescribeColW( void *args ) +{ + struct + { + UINT64 StatementHandle; + INT16 ColumnNumber; + PTR32 ColumnName; + INT16 BufferLength; + PTR32 NameLength; + PTR32 DataType; + PTR32 ColumnSize; + PTR32 DecimalDigits; + PTR32 Nullable; + } const *params32 = args; + + struct SQLDescribeColW_params params = + { + params32->StatementHandle, + params32->ColumnNumber, + ULongToPtr(params32->ColumnName), + params32->BufferLength, + ULongToPtr(params32->NameLength), + ULongToPtr(params32->DataType), + ULongToPtr(params32->ColumnSize), + ULongToPtr(params32->DecimalDigits), + ULongToPtr(params32->Nullable) + }; + + return wrap_SQLDescribeColW( ¶ms ); +} + +static NTSTATUS wow64_SQLDescribeParam( void *args ) +{ + struct + { + UINT64 StatementHandle; + INT16 ParameterNumber; + PTR32 DataType; + PTR32 ParameterSize; + PTR32 DecimalDigits; + PTR32 Nullable; + } const *params32 = args; + + struct SQLDescribeParam_params params = + { + params32->StatementHandle, + params32->ParameterNumber, + ULongToPtr(params32->DataType), + ULongToPtr(params32->ParameterSize), + ULongToPtr(params32->DecimalDigits), + ULongToPtr(params32->Nullable) + }; + + return wrap_SQLDescribeParam( ¶ms ); +} + +static NTSTATUS wow64_SQLDrivers( void *args ) +{ + struct + { + UINT64 EnvironmentHandle; + UINT16 Direction; + PTR32 DriverDescription; + INT16 BufferLength1; + PTR32 DescriptionLength; + PTR32 DriverAttributes; + INT16 BufferLength2; + PTR32 AttributesLength; + } const *params32 = args; + + struct SQLDrivers_params params = + { + params32->EnvironmentHandle, + params32->Direction, + ULongToPtr(params32->DriverDescription), + params32->BufferLength1, + ULongToPtr(params32->DescriptionLength), + ULongToPtr(params32->DriverAttributes), + params32->BufferLength2, + ULongToPtr(params32->AttributesLength) + }; + + return wrap_SQLDrivers( ¶ms ); +} + +static NTSTATUS wow64_SQLDriversW( void *args ) +{ + struct + { + UINT64 EnvironmentHandle; + UINT16 Direction; + PTR32 DriverDescription; + INT16 BufferLength1; + PTR32 DescriptionLength; + PTR32 DriverAttributes; + INT16 BufferLength2; + PTR32 AttributesLength; + } const *params32 = args; + + struct SQLDriversW_params params = + { + params32->EnvironmentHandle, + params32->Direction, + ULongToPtr(params32->DriverDescription), + params32->BufferLength1, + ULongToPtr(params32->DescriptionLength), + ULongToPtr(params32->DriverAttributes), + params32->BufferLength2, + ULongToPtr(params32->AttributesLength) + }; + + return wrap_SQLDriversW( ¶ms ); +} + +static NTSTATUS wow64_SQLDriverConnect( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + PTR32 WindowHandle; + PTR32 InConnectionString; + INT16 Length; + PTR32 OutConnectionString; + INT16 BufferLength; + PTR32 Length2; + UINT16 DriverCompletion; + } const *params32 = args; + + struct SQLDriverConnect_params params = + { + params32->ConnectionHandle, + ULongToPtr(params32->WindowHandle), + ULongToPtr(params32->InConnectionString), + params32->Length, + ULongToPtr(params32->OutConnectionString), + params32->BufferLength, + ULongToPtr(params32->Length2), + params32->DriverCompletion, + }; + + return wrap_SQLDriverConnect( ¶ms ); +} + +static NTSTATUS wow64_SQLDriverConnectW( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + PTR32 WindowHandle; + PTR32 InConnectionString; + INT16 Length; + PTR32 OutConnectionString; + INT16 BufferLength; + PTR32 Length2; + UINT16 DriverCompletion; + } const *params32 = args; + + struct SQLDriverConnectW_params params = + { + params32->ConnectionHandle, + ULongToPtr(params32->WindowHandle), + ULongToPtr(params32->InConnectionString), + params32->Length, + ULongToPtr(params32->OutConnectionString), + params32->BufferLength, + ULongToPtr(params32->Length2), + params32->DriverCompletion, + }; + + return wrap_SQLDriverConnectW( ¶ms ); +} + +static NTSTATUS wow64_SQLError( void *args ) +{ + struct + { + UINT64 EnvironmentHandle; + UINT64 ConnectionHandle; + UINT64 StatementHandle; + PTR32 SqlState; + PTR32 NativeError; + PTR32 MessageText; + INT16 BufferLength; + PTR32 TextLength; + } const *params32 = args; + + struct SQLError_params params = + { + params32->EnvironmentHandle, + params32->ConnectionHandle, + params32->StatementHandle, + ULongToPtr(params32->SqlState), + ULongToPtr(params32->NativeError), + ULongToPtr(params32->MessageText), + params32->BufferLength, + ULongToPtr(params32->TextLength) + }; + + return wrap_SQLError( ¶ms ); +} + +static NTSTATUS wow64_SQLErrorW( void *args ) +{ + struct + { + UINT64 EnvironmentHandle; + UINT64 ConnectionHandle; + UINT64 StatementHandle; + PTR32 SqlState; + PTR32 NativeError; + PTR32 MessageText; + INT16 BufferLength; + PTR32 TextLength; + } const *params32 = args; + + struct SQLErrorW_params params = + { + params32->EnvironmentHandle, + params32->ConnectionHandle, + params32->StatementHandle, + ULongToPtr(params32->SqlState), + ULongToPtr(params32->NativeError), + ULongToPtr(params32->MessageText), + params32->BufferLength, + ULongToPtr(params32->TextLength) + }; + + return wrap_SQLErrorW( ¶ms ); +} + +static NTSTATUS wow64_SQLExecDirect( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 StatementText; + INT32 TextLength; + } const *params32 = args; + + struct SQLExecDirect_params params = + { + params32->StatementHandle, + ULongToPtr(params32->StatementText), + params32->TextLength, + }; + + return wrap_SQLExecDirect( ¶ms ); +} + +static NTSTATUS wow64_SQLExecDirectW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 StatementText; + INT32 TextLength; + } const *params32 = args; + + struct SQLExecDirectW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->StatementText), + params32->TextLength, + }; + + return wrap_SQLExecDirectW( ¶ms ); +} + +static NTSTATUS wow64_SQLExtendedFetch( void *args ) +{ + struct + { + UINT64 StatementHandle; + INT16 FetchOrientation; + INT64 FetchOffset; + UINT64 RowCount; + PTR32 RowStatusArray; + } const *params32 = args; + + struct SQLExtendedFetch_params params = + { + params32->StatementHandle, + params32->FetchOrientation, + params32->FetchOffset, + ULongToPtr(params32->RowCount), + ULongToPtr(params32->RowStatusArray) + }; + + return wrap_SQLExtendedFetch( ¶ms ); +} + +static NTSTATUS wow64_SQLForeignKeys( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 PkCatalogName; + INT16 NameLength1; + PTR32 PkSchemaName; + INT16 NameLength2; + PTR32 PkTableName; + INT16 NameLength3; + PTR32 FkCatalogName; + INT16 NameLength4; + PTR32 FkSchemaName; + INT16 NameLength5; + PTR32 FkTableName; + INT16 NameLength6; + } const *params32 = args; + + struct SQLForeignKeys_params params = + { + params32->StatementHandle, + ULongToPtr(params32->PkCatalogName), + params32->NameLength1, + ULongToPtr(params32->PkSchemaName), + params32->NameLength2, + ULongToPtr(params32->PkTableName), + params32->NameLength3, + ULongToPtr(params32->FkCatalogName), + params32->NameLength4, + ULongToPtr(params32->FkSchemaName), + params32->NameLength5, + ULongToPtr(params32->FkTableName), + params32->NameLength6 + }; + + return wrap_SQLForeignKeys( ¶ms ); +} + +static NTSTATUS wow64_SQLForeignKeysW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 PkCatalogName; + INT16 NameLength1; + PTR32 PkSchemaName; + INT16 NameLength2; + PTR32 PkTableName; + INT16 NameLength3; + PTR32 FkCatalogName; + INT16 NameLength4; + PTR32 FkSchemaName; + INT16 NameLength5; + PTR32 FkTableName; + INT16 NameLength6; + } const *params32 = args; + + struct SQLForeignKeysW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->PkCatalogName), + params32->NameLength1, + ULongToPtr(params32->PkSchemaName), + params32->NameLength2, + ULongToPtr(params32->PkTableName), + params32->NameLength3, + ULongToPtr(params32->FkCatalogName), + params32->NameLength4, + ULongToPtr(params32->FkSchemaName), + params32->NameLength5, + ULongToPtr(params32->FkTableName), + params32->NameLength6 + }; + + return wrap_SQLForeignKeysW( ¶ms ); +} + +static NTSTATUS wow64_SQLGetConnectAttr( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + INT32 Attribute; + PTR32 Value; + INT32 BufferLength; + PTR32 StringLength; + } const *params32 = args; + + struct SQLGetConnectAttr_params params = + { + params32->ConnectionHandle, + params32->Attribute, + ULongToPtr(params32->Value), + params32->BufferLength, + ULongToPtr(params32->StringLength) + }; + + return wrap_SQLGetConnectAttr( ¶ms ); +} + +static NTSTATUS wow64_SQLGetConnectAttrW( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + INT32 Attribute; + PTR32 Value; + INT32 BufferLength; + PTR32 StringLength; + } const *params32 = args; + + struct SQLGetConnectAttrW_params params = + { + params32->ConnectionHandle, + params32->Attribute, + ULongToPtr(params32->Value), + params32->BufferLength, + ULongToPtr(params32->StringLength) + }; + + return wrap_SQLGetConnectAttrW( ¶ms ); +} + +static NTSTATUS wow64_SQLGetConnectOption( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + INT16 Option; + PTR32 Value; + } const *params32 = args; + + struct SQLGetConnectOption_params params = + { + params32->ConnectionHandle, + params32->Option, + ULongToPtr(params32->Value) + }; + + return wrap_SQLGetConnectOption( ¶ms ); +} + +static NTSTATUS wow64_SQLGetConnectOptionW( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + INT16 Option; + PTR32 Value; + } const *params32 = args; + + struct SQLGetConnectOptionW_params params = + { + params32->ConnectionHandle, + params32->Option, + ULongToPtr(params32->Value) + }; + + return wrap_SQLGetConnectOptionW( ¶ms ); +} + +static NTSTATUS wow64_SQLGetCursorName( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CursorName; + INT16 BufferLength; + PTR32 NameLength; + } const *params32 = args; + + struct SQLGetCursorName_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CursorName), + params32->BufferLength, + ULongToPtr(params32->NameLength) + }; + + return wrap_SQLGetCursorName( ¶ms ); +} + +static NTSTATUS wow64_SQLGetCursorNameW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CursorName; + INT16 BufferLength; + PTR32 NameLength; + } const *params32 = args; + + struct SQLGetCursorNameW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CursorName), + params32->BufferLength, + ULongToPtr(params32->NameLength) + }; + + return wrap_SQLGetCursorNameW( ¶ms ); +} + +static NTSTATUS wow64_SQLGetData( void *args ) +{ + struct + { + UINT64 StatementHandle; + INT16 ColumnNumber; + INT16 TargetType; + PTR32 TargetValue; + INT64 BufferLength; + PTR32 StrLen_or_Ind; + } const *params32 = args; + + struct SQLGetData_params params = + { + params32->StatementHandle, + params32->ColumnNumber, + params32->TargetType, + ULongToPtr(params32->TargetValue), + params32->BufferLength, + ULongToPtr(params32->StrLen_or_Ind) + }; + + return wrap_SQLGetData( ¶ms ); +} + +static NTSTATUS wow64_SQLGetDescField( void *args ) +{ + struct + { + UINT64 DescriptorHandle; + INT16 RecNumber; + INT16 FieldIdentifier; + PTR32 Value; + INT32 BufferLength; + PTR32 StringLength; + } const *params32 = args; + + struct SQLGetDescField_params params = + { + params32->DescriptorHandle, + params32->RecNumber, + params32->FieldIdentifier, + ULongToPtr(params32->Value), + params32->BufferLength, + ULongToPtr(params32->StringLength) + }; + + return wrap_SQLGetDescField( ¶ms ); +} + +static NTSTATUS wow64_SQLGetDescFieldW( void *args ) +{ + struct + { + UINT64 DescriptorHandle; + INT16 RecNumber; + INT16 FieldIdentifier; + PTR32 Value; + INT32 BufferLength; + PTR32 StringLength; + } const *params32 = args; + + struct SQLGetDescFieldW_params params = + { + params32->DescriptorHandle, + params32->RecNumber, + params32->FieldIdentifier, + ULongToPtr(params32->Value), + params32->BufferLength, + ULongToPtr(params32->StringLength) + }; + + return wrap_SQLGetDescFieldW( ¶ms ); +} + +static NTSTATUS wow64_SQLGetDescRec( void *args ) +{ + struct + { + UINT64 DescriptorHandle; + INT16 RecNumber; + PTR32 Name; + INT16 BufferLength; + PTR32 StringLength; + PTR32 Type; + PTR32 SubType; + PTR32 Length; + PTR32 Precision; + PTR32 Scale; + PTR32 Nullable; + } const *params32 = args; + + struct SQLGetDescRec_params params = + { + params32->DescriptorHandle, + params32->RecNumber, + ULongToPtr(params32->Name), + params32->BufferLength, + ULongToPtr(params32->StringLength), + ULongToPtr(params32->Type), + ULongToPtr(params32->SubType), + ULongToPtr(params32->Length), + ULongToPtr(params32->Precision), + ULongToPtr(params32->Scale), + ULongToPtr(params32->Nullable) + }; + + return wrap_SQLGetDescRec( ¶ms ); +} + +static NTSTATUS wow64_SQLGetDescRecW( void *args ) +{ + struct + { + UINT64 DescriptorHandle; + INT16 RecNumber; + PTR32 Name; + INT16 BufferLength; + PTR32 StringLength; + PTR32 Type; + PTR32 SubType; + PTR32 Length; + PTR32 Precision; + PTR32 Scale; + PTR32 Nullable; + } const *params32 = args; + + struct SQLGetDescRecW_params params = + { + params32->DescriptorHandle, + params32->RecNumber, + ULongToPtr(params32->Name), + params32->BufferLength, + ULongToPtr(params32->StringLength), + ULongToPtr(params32->Type), + ULongToPtr(params32->SubType), + ULongToPtr(params32->Length), + ULongToPtr(params32->Precision), + ULongToPtr(params32->Scale), + ULongToPtr(params32->Nullable) + }; + + return wrap_SQLGetDescRecW( ¶ms ); +} + +static NTSTATUS wow64_SQLGetDiagRec( void *args ) +{ + struct + { + INT16 HandleType; + UINT64 Handle; + INT16 RecNumber; + PTR32 SqlState; + PTR32 NativeError; + PTR32 MessageText; + INT16 BufferLength; + PTR32 TextLength; + } const *params32 = args; + + struct SQLGetDiagRec_params params = + { + params32->HandleType, + params32->Handle, + params32->RecNumber, + ULongToPtr(params32->SqlState), + ULongToPtr(params32->NativeError), + ULongToPtr(params32->MessageText), + params32->BufferLength, + ULongToPtr(params32->TextLength) + }; + + return wrap_SQLGetDiagRec( ¶ms ); +} + +static NTSTATUS wow64_SQLGetDiagRecW( void *args ) +{ + struct + { + INT16 HandleType; + UINT64 Handle; + INT16 RecNumber; + PTR32 SqlState; + PTR32 NativeError; + PTR32 MessageText; + INT16 BufferLength; + PTR32 TextLength; + } const *params32 = args; + + struct SQLGetDiagRecW_params params = + { + params32->HandleType, + params32->Handle, + params32->RecNumber, + ULongToPtr(params32->SqlState), + ULongToPtr(params32->NativeError), + ULongToPtr(params32->MessageText), + params32->BufferLength, + ULongToPtr(params32->TextLength) + }; + + return wrap_SQLGetDiagRecW( ¶ms ); +} + +static NTSTATUS wow64_SQLGetDiagField( void *args ) +{ + struct + { + INT16 HandleType; + UINT64 Handle; + INT16 RecNumber; + INT16 DiagIdentifier; + PTR32 DiagInfo; + INT16 BufferLength; + PTR32 StringLength; + } const *params32 = args; + + struct SQLGetDiagField_params params = + { + params32->HandleType, + params32->Handle, + params32->RecNumber, + params32->DiagIdentifier, + ULongToPtr(params32->DiagInfo), + params32->BufferLength, + ULongToPtr(params32->StringLength) + }; + + return wrap_SQLGetDiagField( ¶ms ); +} + +static NTSTATUS wow64_SQLGetDiagFieldW( void *args ) +{ + struct + { + INT16 HandleType; + UINT64 Handle; + INT16 RecNumber; + INT16 DiagIdentifier; + PTR32 DiagInfo; + INT16 BufferLength; + PTR32 StringLength; + } const *params32 = args; + + struct SQLGetDiagFieldW_params params = + { + params32->HandleType, + params32->Handle, + params32->RecNumber, + params32->DiagIdentifier, + ULongToPtr(params32->DiagInfo), + params32->BufferLength, + ULongToPtr(params32->StringLength) + }; + + return wrap_SQLGetDiagFieldW( ¶ms ); +} + +static NTSTATUS wow64_SQLGetEnvAttr( void *args ) +{ + struct + { + UINT64 EnvironmentHandle; + INT32 Attribute; + PTR32 Value; + INT32 BufferLength; + PTR32 StringLength; + } const *params32 = args; + + struct SQLGetEnvAttr_params params = + { + params32->EnvironmentHandle, + params32->Attribute, + ULongToPtr(params32->Value), + params32->BufferLength, + ULongToPtr(params32->StringLength) + }; + + return wrap_SQLGetEnvAttr( ¶ms ); +} + +static NTSTATUS wow64_SQLGetFunctions( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + UINT16 FunctionId; + PTR32 Supported; + } const *params32 = args; + + struct SQLGetFunctions_params params = + { + params32->ConnectionHandle, + params32->FunctionId, + ULongToPtr(params32->Supported) + }; + + return wrap_SQLGetFunctions( ¶ms ); +} + +static NTSTATUS wow64_SQLGetInfo( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + UINT16 InfoType; + PTR32 InfoValue; + INT16 BufferLength; + PTR32 StringLength; + } const *params32 = args; + + struct SQLGetInfo_params params = + { + params32->ConnectionHandle, + params32->InfoType, + ULongToPtr(params32->InfoValue), + params32->BufferLength, + ULongToPtr(params32->StringLength) + }; + + return wrap_SQLGetInfo( ¶ms ); +} + +static NTSTATUS wow64_SQLGetInfoW( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + UINT16 InfoType; + PTR32 InfoValue; + INT16 BufferLength; + PTR32 StringLength; + } const *params32 = args; + + struct SQLGetInfoW_params params = + { + params32->ConnectionHandle, + params32->InfoType, + ULongToPtr(params32->InfoValue), + params32->BufferLength, + ULongToPtr(params32->StringLength) + }; + + return wrap_SQLGetInfoW( ¶ms ); +} + +static NTSTATUS wow64_SQLGetStmtOption( void *args ) +{ + struct + { + UINT64 StatementHandle; + UINT16 Option; + PTR32 Value; + } const *params32 = args; + + struct SQLGetStmtOption_params params = + { + params32->StatementHandle, + params32->Option, + ULongToPtr(params32->Value) + }; + + return wrap_SQLGetStmtOption( ¶ms ); +} + +static NTSTATUS wow64_SQLNativeSql( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + PTR32 InStatementText; + INT32 TextLength1; + PTR32 OutStatementText; + INT32 BufferLength; + PTR32 TextLength2; + } const *params32 = args; + + struct SQLNativeSql_params params = + { + params32->ConnectionHandle, + ULongToPtr(params32->InStatementText), + params32->TextLength1, + ULongToPtr(params32->OutStatementText), + params32->BufferLength, + ULongToPtr(params32->TextLength2) + }; + + return wrap_SQLNativeSql( ¶ms ); +} + +static NTSTATUS wow64_SQLNativeSqlW( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + PTR32 InStatementText; + INT32 TextLength1; + PTR32 OutStatementText; + INT32 BufferLength; + PTR32 TextLength2; + } const *params32 = args; + + struct SQLNativeSqlW_params params = + { + params32->ConnectionHandle, + ULongToPtr(params32->InStatementText), + params32->TextLength1, + ULongToPtr(params32->OutStatementText), + params32->BufferLength, + ULongToPtr(params32->TextLength2) + }; + + return wrap_SQLNativeSqlW( ¶ms ); +} + +static NTSTATUS wow64_SQLNumParams( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 ParameterCount; + } const *params32 = args; + + struct SQLNumParams_params params = + { + params32->StatementHandle, + ULongToPtr(params32->ParameterCount) + }; + + return wrap_SQLNumParams( ¶ms ); +} + +static NTSTATUS wow64_SQLNumResultCols( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 ColumnCount; + } const *params32 = args; + + struct SQLNumResultCols_params params = + { + params32->StatementHandle, + ULongToPtr(params32->ColumnCount) + }; + + return wrap_SQLNumResultCols( ¶ms ); +} + +static NTSTATUS wow64_SQLParamData( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 Value; + } const *params32 = args; + + struct SQLParamData_params params = + { + params32->StatementHandle, + ULongToPtr(params32->Value) + }; + + return wrap_SQLParamData( ¶ms ); +} + +static NTSTATUS wow64_SQLParamOptions( void *args ) +{ + struct + { + UINT64 StatementHandle; + UINT64 RowCount; + PTR32 RowNumber; + } const *params32 = args; + + struct SQLParamOptions_params params = + { + params32->StatementHandle, + params32->RowCount, + ULongToPtr(params32->RowNumber) + }; + + return wrap_SQLParamOptions( ¶ms ); +} + +static NTSTATUS wow64_SQLPrepare( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 StatementText; + INT32 TextLength; + } const *params32 = args; + + struct SQLPrepare_params params = + { + params32->StatementHandle, + ULongToPtr(params32->StatementText), + params32->TextLength, + }; + + return wrap_SQLPrepare( ¶ms ); +} + +static NTSTATUS wow64_SQLPrepareW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 StatementText; + INT32 TextLength; + } const *params32 = args; + + struct SQLPrepareW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->StatementText), + params32->TextLength, + }; + + return wrap_SQLPrepareW( ¶ms ); +} + +static NTSTATUS wow64_SQLPrimaryKeys( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + } const *params32 = args; + + struct SQLPrimaryKeys_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3 + }; + + return wrap_SQLPrimaryKeys( ¶ms ); +} + +static NTSTATUS wow64_SQLPrimaryKeysW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + } const *params32 = args; + + struct SQLPrimaryKeysW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3 + }; + + return wrap_SQLPrimaryKeysW( ¶ms ); +} + +static NTSTATUS wow64_SQLProcedureColumns( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 ProcName; + INT16 NameLength3; + PTR32 ColumnName; + INT16 NameLength4; + } const *params32 = args; + + struct SQLProcedureColumns_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->ProcName), + params32->NameLength3, + ULongToPtr(params32->ColumnName), + params32->NameLength4 + }; + + return wrap_SQLProcedureColumns( ¶ms ); +} + +static NTSTATUS wow64_SQLProcedureColumnsW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 ProcName; + INT16 NameLength3; + PTR32 ColumnName; + INT16 NameLength4; + } const *params32 = args; + + struct SQLProcedureColumnsW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->ProcName), + params32->NameLength3, + ULongToPtr(params32->ColumnName), + params32->NameLength4 + }; + + return wrap_SQLProcedureColumnsW( ¶ms ); +} + +static NTSTATUS wow64_SQLProcedures( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 ProcName; + INT16 NameLength3; + } const *params32 = args; + + struct SQLProcedures_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->ProcName), + params32->NameLength3 + }; + + return wrap_SQLProcedures( ¶ms ); +} + +static NTSTATUS wow64_SQLProceduresW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 ProcName; + INT16 NameLength3; + } const *params32 = args; + + struct SQLProceduresW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->ProcName), + params32->NameLength3 + }; + + return wrap_SQLProceduresW( ¶ms ); +} + +static NTSTATUS wow64_SQLPutData( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 Data; + INT64 StrLen_or_Ind; + } const *params32 = args; + + struct SQLPutData_params params = + { + params32->StatementHandle, + ULongToPtr(params32->Data), + params32->StrLen_or_Ind + }; + + return wrap_SQLPutData( ¶ms ); +} + +static NTSTATUS wow64_SQLRowCount( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 RowCount; + } const *params32 = args; + + struct SQLRowCount_params params = + { + params32->StatementHandle, + ULongToPtr(params32->RowCount) + }; + + return wrap_SQLRowCount( ¶ms ); +} + +static NTSTATUS wow64_SQLSetConnectAttr( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + INT32 Attribute; + PTR32 Value; + INT32 StringLength; + } const *params32 = args; + + struct SQLSetConnectAttr_params params = + { + params32->ConnectionHandle, + params32->Attribute, + ULongToPtr(params32->Value), + params32->StringLength + }; + + return wrap_SQLSetConnectAttr( ¶ms ); +} + +static NTSTATUS wow64_SQLSetConnectAttrW( void *args ) +{ + struct + { + UINT64 ConnectionHandle; + INT32 Attribute; + PTR32 Value; + INT32 StringLength; + } const *params32 = args; + + struct SQLSetConnectAttrW_params params = + { + params32->ConnectionHandle, + params32->Attribute, + ULongToPtr(params32->Value), + params32->StringLength + }; + + return wrap_SQLSetConnectAttrW( ¶ms ); +} + +static NTSTATUS wow64_SQLSetCursorName( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CursorName; + INT16 NameLength; + } const *params32 = args; + + struct SQLSetCursorName_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CursorName), + params32->NameLength + }; + + return wrap_SQLSetCursorName( ¶ms ); +} + +static NTSTATUS wow64_SQLSetCursorNameW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CursorName; + INT16 NameLength; + } const *params32 = args; + + struct SQLSetCursorNameW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CursorName), + params32->NameLength + }; + + return wrap_SQLSetCursorNameW( ¶ms ); +} + +static NTSTATUS wow64_SQLSetDescField( void *args ) +{ + struct + { + UINT64 DescriptorHandle; + INT16 RecNumber; + INT16 FieldIdentifier; + PTR32 Value; + INT32 BufferLength; + } const *params32 = args; + + struct SQLSetDescField_params params = + { + params32->DescriptorHandle, + params32->RecNumber, + params32->FieldIdentifier, + ULongToPtr(params32->Value), + params32->BufferLength + }; + + return wrap_SQLSetDescField( ¶ms ); +} + +static NTSTATUS wow64_SQLSetDescFieldW( void *args ) +{ + struct + { + UINT64 DescriptorHandle; + INT16 RecNumber; + INT16 FieldIdentifier; + PTR32 Value; + INT32 BufferLength; + } const *params32 = args; + + struct SQLSetDescFieldW_params params = + { + params32->DescriptorHandle, + params32->RecNumber, + params32->FieldIdentifier, + ULongToPtr(params32->Value), + params32->BufferLength + }; + + return wrap_SQLSetDescFieldW( ¶ms ); +} + +static NTSTATUS wow64_SQLSetDescRec( void *args ) +{ + struct + { + UINT64 DescriptorHandle; + INT16 RecNumber; + INT16 Type; + INT16 SubType; + INT64 Length; + INT16 Precision; + INT16 Scale; + PTR32 Data; + PTR32 StringLength; + PTR32 Indicator; + } const *params32 = args; + + struct SQLSetDescRec_params params = + { + params32->DescriptorHandle, + params32->RecNumber, + params32->Type, + params32->SubType, + params32->Length, + params32->Precision, + params32->Scale, + ULongToPtr(params32->Data), + ULongToPtr(params32->StringLength), + ULongToPtr(params32->Indicator) + }; + + return wrap_SQLSetDescRec( ¶ms ); +} + +static NTSTATUS wow64_SQLSetEnvAttr( void *args ) +{ + struct + { + UINT64 EnvironmentHandle; + INT32 Attribute; + PTR32 Value; + INT32 StringLength; + } const *params32 = args; + + struct SQLSetEnvAttr_params params = + { + params32->EnvironmentHandle, + params32->Attribute, + ULongToPtr(params32->Value), + params32->StringLength + }; + + return wrap_SQLSetEnvAttr( ¶ms ); +} + +static NTSTATUS wow64_SQLSetParam( void *args ) +{ + struct + { + UINT64 StatementHandle; + INT16 ParameterNumber; + INT16 ValueType; + INT16 ParameterType; + UINT64 LengthPrecision; + INT16 ParameterScale; + PTR32 ParameterValue; + PTR32 StrLen_or_Ind; + } const *params32 = args; + + struct SQLSetParam_params params = + { + params32->StatementHandle, + params32->ParameterNumber, + params32->ValueType, + params32->ParameterType, + params32->LengthPrecision, + params32->ParameterScale, + ULongToPtr(params32->ParameterValue), + ULongToPtr(params32->StrLen_or_Ind) + }; + + return wrap_SQLSetParam( ¶ms ); +} + +static NTSTATUS wow64_SQLSetStmtAttr( void *args ) +{ + struct + { + UINT64 StatementHandle; + INT32 Attribute; + PTR32 Value; + INT32 StringLength; + } const *params32 = args; + + struct SQLSetStmtAttr_params params = + { + params32->StatementHandle, + params32->Attribute, + ULongToPtr(params32->Value), + params32->StringLength + }; + + return wrap_SQLSetStmtAttr( ¶ms ); +} + +static NTSTATUS wow64_SQLSetStmtAttrW( void *args ) +{ + struct + { + UINT64 StatementHandle; + INT32 Attribute; + PTR32 Value; + INT32 StringLength; + } const *params32 = args; + + struct SQLSetStmtAttrW_params params = + { + params32->StatementHandle, + params32->Attribute, + ULongToPtr(params32->Value), + params32->StringLength + }; + + return wrap_SQLSetStmtAttrW( ¶ms ); +} + +static NTSTATUS wow64_SQLSpecialColumns( void *args ) +{ + struct + { + UINT64 StatementHandle; + UINT16 IdentifierType; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + UINT16 Scope; + UINT16 Nullable; + } const *params32 = args; + + struct SQLSpecialColumns_params params = + { + params32->StatementHandle, + params32->IdentifierType, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3, + params32->Scope, + params32->Nullable + }; + + return wrap_SQLSpecialColumns( ¶ms ); +} + +static NTSTATUS wow64_SQLSpecialColumnsW( void *args ) +{ + struct + { + UINT64 StatementHandle; + UINT16 IdentifierType; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + UINT16 Scope; + UINT16 Nullable; + } const *params32 = args; + + struct SQLSpecialColumnsW_params params = + { + params32->StatementHandle, + params32->IdentifierType, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3, + params32->Scope, + params32->Nullable + }; + + return wrap_SQLSpecialColumnsW( ¶ms ); +} + +static NTSTATUS wow64_SQLStatistics( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + UINT16 Unique; + UINT16 Reserved; + } const *params32 = args; + + struct SQLStatistics_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3, + params32->Unique, + params32->Reserved + }; + + return wrap_SQLStatistics( ¶ms ); +} + +static NTSTATUS wow64_SQLStatisticsW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + UINT16 Unique; + UINT16 Reserved; + } const *params32 = args; + + struct SQLStatisticsW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3, + params32->Unique, + params32->Reserved + }; + + return wrap_SQLStatisticsW( ¶ms ); +} + +static NTSTATUS wow64_SQLGetStmtAttr( void *args ) +{ + struct + { + UINT64 StatementHandle; + INT32 Attribute; + PTR32 Value; + INT32 BufferLength; + PTR32 StringLength; + } const *params32 = args; + + struct SQLGetStmtAttr_params params = + { + params32->StatementHandle, + params32->Attribute, + ULongToPtr(params32->Value), + params32->BufferLength, + ULongToPtr(params32->StringLength) + }; + + return wrap_SQLGetStmtAttr( ¶ms ); +} + +static NTSTATUS wow64_SQLGetStmtAttrW( void *args ) +{ + struct + { + UINT64 StatementHandle; + INT32 Attribute; + PTR32 Value; + INT32 BufferLength; + PTR32 StringLength; + } const *params32 = args; + + struct SQLGetStmtAttrW_params params = + { + params32->StatementHandle, + params32->Attribute, + ULongToPtr(params32->Value), + params32->BufferLength, + ULongToPtr(params32->StringLength) + }; + + return wrap_SQLGetStmtAttrW( ¶ms ); +} + +static NTSTATUS wow64_SQLTablePrivileges( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + } const *params32 = args; + + struct SQLTablePrivileges_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3 + }; + + return wrap_SQLTablePrivileges( ¶ms ); +} + +static NTSTATUS wow64_SQLTablePrivilegesW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + } const *params32 = args; + + struct SQLTablePrivilegesW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3 + }; + + return wrap_SQLTablePrivilegesW( ¶ms ); +} + +static NTSTATUS wow64_SQLTables( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + PTR32 TableType; + INT16 NameLength4; + } const *params32 = args; + + struct SQLTables_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3, + ULongToPtr(params32->TableType), + params32->NameLength4 + }; + + return wrap_SQLTables( ¶ms ); +} + +static NTSTATUS wow64_SQLTablesW( void *args ) +{ + struct + { + UINT64 StatementHandle; + PTR32 CatalogName; + INT16 NameLength1; + PTR32 SchemaName; + INT16 NameLength2; + PTR32 TableName; + INT16 NameLength3; + PTR32 TableType; + INT16 NameLength4; + } const *params32 = args; + + struct SQLTablesW_params params = + { + params32->StatementHandle, + ULongToPtr(params32->CatalogName), + params32->NameLength1, + ULongToPtr(params32->SchemaName), + params32->NameLength2, + ULongToPtr(params32->TableName), + params32->NameLength3, + ULongToPtr(params32->TableType), + params32->NameLength4 + }; + + return wrap_SQLTablesW( ¶ms ); +} + +const unixlib_entry_t __wine_unix_call_wow64_funcs[] = +{ + odbc_process_attach, + odbc_process_detach, + wrap_SQLAllocConnect, + wrap_SQLAllocEnv, + wrap_SQLAllocHandle, + wrap_SQLAllocHandleStd, + wrap_SQLAllocStmt, + wow64_SQLBindCol, + wow64_SQLBindParam, + wow64_SQLBindParameter, + wow64_SQLBrowseConnect, + wow64_SQLBrowseConnectW, + wrap_SQLBulkOperations, + wrap_SQLCancel, + wrap_SQLCloseCursor, + wow64_SQLColAttribute, + wow64_SQLColAttributeW, + wow64_SQLColAttributes, + wow64_SQLColAttributesW, + wow64_SQLColumnPrivileges, + wow64_SQLColumnPrivilegesW, + wow64_SQLColumns, + wow64_SQLColumnsW, + wow64_SQLConnect, + wow64_SQLConnectW, + wrap_SQLCopyDesc, + wow64_SQLDataSources, + wow64_SQLDataSourcesW, + wow64_SQLDescribeCol, + wow64_SQLDescribeColW, + wow64_SQLDescribeParam, + wrap_SQLDisconnect, + wow64_SQLDriverConnect, + wow64_SQLDriverConnectW, + wow64_SQLDrivers, + wow64_SQLDriversW, + wrap_SQLEndTran, + wow64_SQLError, + wow64_SQLErrorW, + wow64_SQLExecDirect, + wow64_SQLExecDirectW, + wrap_SQLExecute, + wow64_SQLExtendedFetch, + wrap_SQLFetch, + wrap_SQLFetchScroll, + wow64_SQLForeignKeys, + wow64_SQLForeignKeysW, + wrap_SQLFreeConnect, + wrap_SQLFreeEnv, + wrap_SQLFreeHandle, + wrap_SQLFreeStmt, + wow64_SQLGetConnectAttr, + wow64_SQLGetConnectAttrW, + wow64_SQLGetConnectOption, + wow64_SQLGetConnectOptionW, + wow64_SQLGetCursorName, + wow64_SQLGetCursorNameW, + wow64_SQLGetData, + wow64_SQLGetDescField, + wow64_SQLGetDescFieldW, + wow64_SQLGetDescRec, + wow64_SQLGetDescRecW, + wow64_SQLGetDiagField, + wow64_SQLGetDiagFieldW, + wow64_SQLGetDiagRec, + wow64_SQLGetDiagRecW, + wow64_SQLGetEnvAttr, + wow64_SQLGetFunctions, + wow64_SQLGetInfo, + wow64_SQLGetInfoW, + wow64_SQLGetStmtAttr, + wow64_SQLGetStmtAttrW, + wow64_SQLGetStmtOption, + wrap_SQLGetTypeInfo, + wrap_SQLGetTypeInfoW, + wrap_SQLMoreResults, + wow64_SQLNativeSql, + wow64_SQLNativeSqlW, + wow64_SQLNumParams, + wow64_SQLNumResultCols, + wow64_SQLParamData, + wow64_SQLParamOptions, + wow64_SQLPrepare, + wow64_SQLPrepareW, + wow64_SQLPrimaryKeys, + wow64_SQLPrimaryKeysW, + wow64_SQLProcedureColumns, + wow64_SQLProcedureColumnsW, + wow64_SQLProcedures, + wow64_SQLProceduresW, + wow64_SQLPutData, + wow64_SQLRowCount, + wow64_SQLSetConnectAttr, + wow64_SQLSetConnectAttrW, + wrap_SQLSetConnectOption, + wrap_SQLSetConnectOptionW, + wow64_SQLSetCursorName, + wow64_SQLSetCursorNameW, + wow64_SQLSetDescField, + wow64_SQLSetDescFieldW, + wow64_SQLSetDescRec, + wow64_SQLSetEnvAttr, + wow64_SQLSetParam, + wrap_SQLSetPos, + wrap_SQLSetScrollOptions, + wow64_SQLSetStmtAttr, + wow64_SQLSetStmtAttrW, + wrap_SQLSetStmtOption, + wow64_SQLSpecialColumns, + wow64_SQLSpecialColumnsW, + wow64_SQLStatistics, + wow64_SQLStatisticsW, + wow64_SQLTablePrivileges, + wow64_SQLTablePrivilegesW, + wow64_SQLTables, + wow64_SQLTablesW, + wrap_SQLTransact, +}; + +C_ASSERT( ARRAYSIZE( __wine_unix_call_wow64_funcs) == unix_funcs_count ); + +#endif /* _WIN64 */ + static NTSTATUS load_odbc(void) { const char *s = getenv("LIB_ODBC_DRIVER_MANAGER");
From: Hans Leidekker hans@codeweavers.com
--- include/sqlucode.h | 126 ++++++++++++++++++++++++++++++--------------- 1 file changed, 85 insertions(+), 41 deletions(-)
diff --git a/include/sqlucode.h b/include/sqlucode.h index a4721b04208..01e0458986a 100644 --- a/include/sqlucode.h +++ b/include/sqlucode.h @@ -32,47 +32,91 @@ extern "C" { #define SQL_WVARCHAR (-9) #define SQL_WLONGVARCHAR (-10)
-SQLRETURN WINAPI SQLColAttributesW(SQLHSTMT hstmt, SQLUSMALLINT icol, SQLUSMALLINT fDescType, - SQLPOINTER rgbDesc, SQLSMALLINT cbDescMax, SQLSMALLINT *pcbDesc, SQLLEN *pfDesc); - -SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, - SQLWCHAR *ServerName, SQLSMALLINT NameLength1, - SQLWCHAR *UserName, SQLSMALLINT NameLength2, - SQLWCHAR *Authentication, SQLSMALLINT NameLength3); - -SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, - SQLUSMALLINT ColumnNumber, SQLWCHAR *ColumnName, - SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, - SQLSMALLINT *DataType, SQLULEN *ColumnSize, - SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable); - -SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, - SQLHWND WindowHandle, WCHAR *InConnectionString, - SQLSMALLINT Length, WCHAR *OutConnectionString, SQLSMALLINT BufferLength, - SQLSMALLINT *Length2, SQLUSMALLINT DriverCompletion); - -SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, - SQLWCHAR *StatementText, SQLINTEGER TextLength); - -SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, - SQLSMALLINT RecNumber, SQLWCHAR *Sqlstate, - SQLINTEGER *NativeError, SQLWCHAR *MessageText, - SQLSMALLINT BufferLength, SQLSMALLINT *TextLength); - -SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, - SQLUSMALLINT InfoType, SQLPOINTER InfoValue, - SQLSMALLINT BufferLength, SQLSMALLINT *StringLength); - -SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, - SQLWCHAR *StatementText, SQLINTEGER TextLength); - -SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, - SQLINTEGER Attribute, SQLPOINTER Value, - SQLINTEGER StringLength); - -SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT type, SQLHANDLE handle, - SQLSMALLINT record, SQLSMALLINT field, SQLPOINTER info, - SQLSMALLINT info_len, SQLSMALLINT *ret_len); +SQLRETURN WINAPI SQLBrowseConnectW(SQLHDBC,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); + +SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*); + +SQLRETURN WINAPI SQLColAttributesW(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*); + +SQLRETURN WINAPI SQLColumnPrivilegesW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT, + SQLWCHAR*,SQLSMALLINT); + +SQLRETURN WINAPI SQLColumnsW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*, + SQLSMALLINT); + +SQLRETURN WINAPI SQLConnectW(SQLHDBC,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); + +SQLRETURN WINAPI SQLDataSourcesW(SQLHENV,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLWCHAR*,SQLSMALLINT, + SQLSMALLINT*); + +SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLULEN*, + SQLSMALLINT*,SQLSMALLINT*); + +SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC,SQLHWND,WCHAR*,SQLSMALLINT,WCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLUSMALLINT); + +SQLRETURN WINAPI SQLDriversW(SQLHENV,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLWCHAR*,SQLSMALLINT, + SQLSMALLINT*); + +SQLRETURN WINAPI SQLErrorW(SQLHENV,SQLHDBC,SQLHSTMT,SQLWCHAR*,SQLINTEGER*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); + +SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT,SQLWCHAR*,SQLINTEGER); + +SQLRETURN WINAPI SQLForeignKeysW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*, + SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); + +SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); + +SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC,SQLUSMALLINT,SQLPOINTER); + +SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); + +SQLRETURN WINAPI SQLGetDescFieldW(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER,SQLINTEGER*); + +SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*, + SQLLEN*,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*); + +SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); + +SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLWCHAR*,SQLINTEGER*,SQLWCHAR*,SQLSMALLINT, + SQLSMALLINT*); + +SQLRETURN WINAPI SQLGetInfoW(SQLHDBC,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); + +SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); + +SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT,SQLSMALLINT); + +SQLRETURN WINAPI SQLNativeSqlW(SQLHDBC,SQLWCHAR*,SQLINTEGER,SQLWCHAR*,SQLINTEGER,SQLINTEGER*); + +SQLRETURN WINAPI SQLPrepareW(SQLHSTMT,SQLWCHAR*,SQLINTEGER); + +SQLRETURN WINAPI SQLPrimaryKeysW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); + +SQLRETURN WINAPI SQLProcedureColumnsW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT, + SQLWCHAR*,SQLSMALLINT); + +SQLRETURN WINAPI SQLProceduresW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); + +SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER); + +SQLRETURN WINAPI SQLSetConnectOptionW(SQLHDBC,SQLUSMALLINT,SQLULEN); + +SQLRETURN WINAPI SQLSetCursorNameW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT); + +SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER); + +SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER); + +SQLRETURN WINAPI SQLSpecialColumnsW(SQLHSTMT,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*, + SQLSMALLINT,SQLUSMALLINT,SQLUSMALLINT); + +SQLRETURN WINAPI SQLStatisticsW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT, + SQLUSMALLINT,SQLUSMALLINT); + +SQLRETURN WINAPI SQLTablePrivilegesW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); + +SQLRETURN WINAPI SQLTablesW(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*, + SQLSMALLINT);
#ifdef __cplusplus }
From: Hans Leidekker hans@codeweavers.com
Implementations are guarded by native function pointer checks but all functions have been present in libodbc for a very long time, so it doesn't appear to be needed anymore.
The loading code checks the LIB_ODBC_DRIVER_MANAGER environment variable to allow the user to override the system version of the library. This can be achieved by other means, if it's still needed. --- configure.ac | 13 +- dlls/odbc32/Makefile.in | 1 + dlls/odbc32/proxyodbc.c | 1 - dlls/odbc32/unixlib.c | 995 ++++++++++------------------------------ dlls/odbc32/unixlib.h | 1 - 5 files changed, 257 insertions(+), 754 deletions(-)
diff --git a/configure.ac b/configure.ac index 31c2fa2588e..8f313701514 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,7 @@ AC_ARG_WITH(inotify, AS_HELP_STRING([--without-inotify],[do not use inotify (f AC_ARG_WITH(krb5, AS_HELP_STRING([--without-krb5],[do not use krb5 (Kerberos)])) AC_ARG_WITH(mingw, AS_HELP_STRING([--without-mingw],[do not use the MinGW cross-compiler])) AC_ARG_WITH(netapi, AS_HELP_STRING([--without-netapi],[do not use the Samba NetAPI library])) +AC_ARG_WITH(odbc, AS_HELP_STRING([--without-odbc],[do not use the ODBC library])) AC_ARG_WITH(opencl, AS_HELP_STRING([--without-opencl],[do not use OpenCL]), [if test "x$withval" = "xno"; then ac_cv_header_CL_cl_h=no; ac_cv_header_OpenCL_opencl_h=no; fi]) AC_ARG_WITH(opengl, AS_HELP_STRING([--without-opengl],[do not use OpenGL])) @@ -1422,6 +1423,15 @@ WINE_NOTICE_WITH(pcsclite,[test "x$PCSCLITE_LIBS" = x], [libpcsclite not found, smart cards won't be supported.], [enable_winscard])
+dnl **** Check for libodbc **** +if test "x$with_odbc" != "xno" +then + AC_CHECK_LIB(odbc,SQLConnect,[AC_SUBST(ODBC_LIBS,["-lodbc"])]) +fi +WINE_NOTICE_WITH(odbc,[test "x$ODBC_LIBS" = x], + [libodbc not found, ODBC won't be supported.], + [enable_odbc32]) + dnl **** Check for inotify **** if test "x$with_inotify" != "xno" then @@ -1811,9 +1821,6 @@ then AC_SUBST(PROCSTAT_LIBS,"-lprocstat")]) fi
-dnl **** Check for libodbc **** -WINE_CHECK_SONAME(odbc,SQLConnect,,[AC_DEFINE_UNQUOTED(SONAME_LIBODBC,["libodbc.$LIBEXT"])]) - dnl **** Check for libnetapi **** if test "x$with_netapi" != "xno" then diff --git a/dlls/odbc32/Makefile.in b/dlls/odbc32/Makefile.in index 44962ca4896..0ec0ae8eaf4 100644 --- a/dlls/odbc32/Makefile.in +++ b/dlls/odbc32/Makefile.in @@ -2,6 +2,7 @@ MODULE = odbc32.dll UNIXLIB = odbc32.so IMPORTLIB = odbc32 IMPORTS = advapi32 +UNIX_LIBS = $(ODBC_LIBS)
SOURCES = \ proxyodbc.c \ diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index bb9e8fd1625..c1c43ab8641 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -2929,7 +2929,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved)
case DLL_PROCESS_DETACH: if (reserved) break; - WINE_UNIX_CALL( process_detach, NULL ); }
return TRUE; diff --git a/dlls/odbc32/unixlib.c b/dlls/odbc32/unixlib.c index ee5605d1d73..dbc0da8d274 100644 --- a/dlls/odbc32/unixlib.c +++ b/dlls/odbc32/unixlib.c @@ -16,12 +16,6 @@ * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * - * NOTES: - * Proxy ODBC driver manager. This manager delegates all ODBC - * calls to a real ODBC driver manager named by the environment - * variable LIB_ODBC_DRIVER_MANAGER, or to libodbc.so if the - * variable is not set. */
#if 0 @@ -40,134 +34,14 @@ #include "windef.h" #include "winbase.h" #include "winternl.h" -#include "wine/debug.h" #include "sql.h" -#include "sqltypes.h" +#include "sqlucode.h" #include "sqlext.h"
-#include "unixlib.h" #include "wine/debug.h" +#include "unixlib.h"
WINE_DEFAULT_DEBUG_CHANNEL(odbc); -WINE_DECLARE_DEBUG_CHANNEL(winediag); - -static void *libodbc; - -static SQLRETURN (*pSQLAllocConnect)(SQLHENV,SQLHDBC*); -static SQLRETURN (*pSQLAllocEnv)(SQLHENV*); -static SQLRETURN (*pSQLAllocHandle)(SQLSMALLINT,SQLHANDLE,SQLHANDLE*); -static SQLRETURN (*pSQLAllocHandleStd)(SQLSMALLINT,SQLHANDLE,SQLHANDLE*); -static SQLRETURN (*pSQLAllocStmt)(SQLHDBC,SQLHSTMT*); -static SQLRETURN (*pSQLBindCol)(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLPOINTER,SQLLEN,SQLLEN*); -static SQLRETURN (*pSQLBindParam)(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLULEN,SQLSMALLINT,SQLPOINTER,SQLLEN*); -static SQLRETURN (*pSQLBindParameter)(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLULEN,SQLSMALLINT,SQLPOINTER,SQLLEN,SQLLEN*); -static SQLRETURN (*pSQLBrowseConnect)(SQLHDBC,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLBrowseConnectW)(SQLHDBC,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLBulkOperations)(SQLHSTMT,SQLSMALLINT); -static SQLRETURN (*pSQLCancel)(SQLHSTMT); -static SQLRETURN (*pSQLCloseCursor)(SQLHSTMT); -static SQLRETURN (*pSQLColAttribute)(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*); -static SQLRETURN (*pSQLColAttributeW)(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*); -static SQLRETURN (*pSQLColAttributes)(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*); -static SQLRETURN (*pSQLColAttributesW)(SQLHSTMT,SQLUSMALLINT,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*,SQLLEN*); -static SQLRETURN (*pSQLColumnPrivileges)(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLColumnPrivilegesW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLColumns)(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLColumnsW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLConnect)(SQLHDBC,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLConnectW)(SQLHDBC,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLCopyDesc)(SQLHDESC,SQLHDESC); -static SQLRETURN (*pSQLDataSources)(SQLHENV,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLDataSourcesW)(SQLHENV,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLDescribeCol)(SQLHSTMT,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLULEN*,SQLSMALLINT*,SQLSMALLINT*); -static SQLRETURN (*pSQLDescribeColW)(SQLHSTMT,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLULEN*,SQLSMALLINT*,SQLSMALLINT*); -static SQLRETURN (*pSQLDescribeParam)(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT*,SQLULEN*,SQLSMALLINT*,SQLSMALLINT*); -static SQLRETURN (*pSQLDisconnect)(SQLHDBC); -static SQLRETURN (*pSQLDriverConnect)(SQLHDBC,SQLHWND,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLUSMALLINT); -static SQLRETURN (*pSQLDriverConnectW)(SQLHDBC,SQLHWND,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLUSMALLINT); -static SQLRETURN (*pSQLDrivers)(SQLHENV,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLDriversW)(SQLHENV,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLEndTran)(SQLSMALLINT,SQLHANDLE,SQLSMALLINT); -static SQLRETURN (*pSQLError)(SQLHENV,SQLHDBC,SQLHSTMT,SQLCHAR*,SQLINTEGER*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLErrorW)(SQLHENV,SQLHDBC,SQLHSTMT,SQLWCHAR*,SQLINTEGER*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLExecDirect)(SQLHSTMT,SQLCHAR*,SQLINTEGER); -static SQLRETURN (*pSQLExecDirectW)(SQLHSTMT,SQLWCHAR*,SQLINTEGER); -static SQLRETURN (*pSQLExecute)(SQLHSTMT); -static SQLRETURN (*pSQLExtendedFetch)(SQLHSTMT,SQLUSMALLINT,SQLLEN,SQLULEN*,SQLUSMALLINT*); -static SQLRETURN (*pSQLFetch)(SQLHSTMT); -static SQLRETURN (*pSQLFetchScroll)(SQLHSTMT,SQLSMALLINT,SQLLEN); -static SQLRETURN (*pSQLForeignKeys)(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLForeignKeysW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLFreeConnect)(SQLHDBC); -static SQLRETURN (*pSQLFreeEnv)(SQLHENV); -static SQLRETURN (*pSQLFreeHandle)(SQLSMALLINT,SQLHANDLE); -static SQLRETURN (*pSQLFreeStmt)(SQLHSTMT,SQLUSMALLINT); -static SQLRETURN (*pSQLGetConnectAttr)(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); -static SQLRETURN (*pSQLGetConnectAttrW)(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); -static SQLRETURN (*pSQLGetConnectOption)(SQLHDBC,SQLUSMALLINT,SQLPOINTER); -static SQLRETURN (*pSQLGetConnectOptionW)(SQLHDBC,SQLUSMALLINT,SQLPOINTER); -static SQLRETURN (*pSQLGetCursorName)(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLGetCursorNameW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLGetData)(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLPOINTER,SQLLEN,SQLLEN*); -static SQLRETURN (*pSQLGetDescField)(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER,SQLINTEGER*); -static SQLRETURN (*pSQLGetDescFieldW)(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER,SQLINTEGER*); -static SQLRETURN (*pSQLGetDescRec)(SQLHDESC,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*,SQLLEN*,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*); -static SQLRETURN (*pSQLGetDescRecW)(SQLHDESC,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*,SQLLEN*,SQLSMALLINT*,SQLSMALLINT*,SQLSMALLINT*); -static SQLRETURN (*pSQLGetDiagField)(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLGetDiagFieldW)(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLGetDiagRec)(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLCHAR*,SQLINTEGER*,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLGetDiagRecW)(SQLSMALLINT,SQLHANDLE,SQLSMALLINT,SQLWCHAR*,SQLINTEGER*,SQLWCHAR*,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLGetEnvAttr)(SQLHENV,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); -static SQLRETURN (*pSQLGetFunctions)(SQLHDBC,SQLUSMALLINT,SQLUSMALLINT*); -static SQLRETURN (*pSQLGetInfo)(SQLHDBC,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLGetInfoW)(SQLHDBC,SQLUSMALLINT,SQLPOINTER,SQLSMALLINT,SQLSMALLINT*); -static SQLRETURN (*pSQLGetStmtAttr)(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); -static SQLRETURN (*pSQLGetStmtAttrW)(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER,SQLINTEGER*); -static SQLRETURN (*pSQLGetStmtOption)(SQLHSTMT,SQLUSMALLINT,SQLPOINTER); -static SQLRETURN (*pSQLGetTypeInfo)(SQLHSTMT,SQLSMALLINT); -static SQLRETURN (*pSQLGetTypeInfoW)(SQLHSTMT,SQLSMALLINT); -static SQLRETURN (*pSQLMoreResults)(SQLHSTMT); -static SQLRETURN (*pSQLNativeSql)(SQLHDBC,SQLCHAR*,SQLINTEGER,SQLCHAR*,SQLINTEGER,SQLINTEGER*); -static SQLRETURN (*pSQLNativeSqlW)(SQLHDBC,SQLWCHAR*,SQLINTEGER,SQLWCHAR*,SQLINTEGER,SQLINTEGER*); -static SQLRETURN (*pSQLNumParams)(SQLHSTMT,SQLSMALLINT*); -static SQLRETURN (*pSQLNumResultCols)(SQLHSTMT,SQLSMALLINT*); -static SQLRETURN (*pSQLParamData)(SQLHSTMT,SQLPOINTER*); -static SQLRETURN (*pSQLParamOptions)(SQLHSTMT,SQLULEN,SQLULEN*); -static SQLRETURN (*pSQLPrepare)(SQLHSTMT,SQLCHAR*,SQLINTEGER); -static SQLRETURN (*pSQLPrepareW)(SQLHSTMT,SQLWCHAR*,SQLINTEGER); -static SQLRETURN (*pSQLPrimaryKeys)(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLPrimaryKeysW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLProcedureColumns)(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLProcedureColumnsW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLProcedures)(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLProceduresW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLPutData)(SQLHSTMT,SQLPOINTER,SQLLEN); -static SQLRETURN (*pSQLRowCount)(SQLHSTMT,SQLLEN*); -static SQLRETURN (*pSQLSetConnectAttr)(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER); -static SQLRETURN (*pSQLSetConnectAttrW)(SQLHDBC,SQLINTEGER,SQLPOINTER,SQLINTEGER); -static SQLRETURN (*pSQLSetConnectOption)(SQLHDBC,SQLUSMALLINT,SQLULEN); -static SQLRETURN (*pSQLSetConnectOptionW)(SQLHDBC,SQLUSMALLINT,SQLULEN); -static SQLRETURN (*pSQLSetCursorName)(SQLHSTMT,SQLCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLSetCursorNameW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLSetDescField)(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER); -static SQLRETURN (*pSQLSetDescFieldW)(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLINTEGER); -static SQLRETURN (*pSQLSetDescRec)(SQLHDESC,SQLSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLLEN,SQLSMALLINT,SQLSMALLINT,SQLPOINTER,SQLLEN*,SQLLEN*); -static SQLRETURN (*pSQLSetEnvAttr)(SQLHENV,SQLINTEGER,SQLPOINTER,SQLINTEGER); -static SQLRETURN (*pSQLSetParam)(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLULEN,SQLSMALLINT,SQLPOINTER,SQLLEN*); -static SQLRETURN (*pSQLSetPos)(SQLHSTMT,SQLSETPOSIROW,SQLUSMALLINT,SQLUSMALLINT); -static SQLRETURN (*pSQLSetScrollOptions)(SQLHSTMT,SQLUSMALLINT,SQLLEN,SQLUSMALLINT); -static SQLRETURN (*pSQLSetStmtAttr)(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER); -static SQLRETURN (*pSQLSetStmtAttrW)(SQLHSTMT,SQLINTEGER,SQLPOINTER,SQLINTEGER); -static SQLRETURN (*pSQLSetStmtOption)(SQLHSTMT,SQLUSMALLINT,SQLULEN); -static SQLRETURN (*pSQLSpecialColumns)(SQLHSTMT,SQLUSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLUSMALLINT,SQLUSMALLINT); -static SQLRETURN (*pSQLSpecialColumnsW)(SQLHSTMT,SQLUSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLUSMALLINT,SQLUSMALLINT); -static SQLRETURN (*pSQLStatistics)(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLUSMALLINT,SQLUSMALLINT); -static SQLRETURN (*pSQLStatisticsW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLUSMALLINT,SQLUSMALLINT); -static SQLRETURN (*pSQLTablePrivileges)(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLTablePrivilegesW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLTables)(SQLHSTMT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLTablesW)(SQLHSTMT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT,SQLWCHAR*,SQLSMALLINT); -static SQLRETURN (*pSQLTransact)(SQLHENV,SQLHDBC,SQLUSMALLINT);
static inline void init_unicode_string( UNICODE_STRING *str, const WCHAR *data, ULONG data_size ) { @@ -288,7 +162,7 @@ static void replicate_odbcinst_to_registry( SQLHENV env ) SQLSMALLINT len;
success = TRUE; - while (SUCCESS((ret = pSQLDriversW( env, dir, (SQLWCHAR *)desc, sizeof(desc), &len, NULL, 0, NULL )))) + while (SUCCESS((ret = SQLDriversW( env, dir, (SQLWCHAR *)desc, sizeof(desc), &len, NULL, 0, NULL )))) { dir = SQL_FETCH_NEXT; if (len == lstrlenW( desc )) @@ -377,8 +251,8 @@ static void replicate_odbc_to_registry( BOOL is_user, SQLHENV env ) { success = TRUE; dir = is_user ? SQL_FETCH_FIRST_USER : SQL_FETCH_FIRST_SYSTEM; - while (SUCCESS((ret = pSQLDataSourcesW( env, dir, (SQLWCHAR *)dsn, sizeof(dsn), &len_dsn, (SQLWCHAR *)desc, - sizeof(desc), &len_desc )))) + while (SUCCESS((ret = SQLDataSourcesW( env, dir, (SQLWCHAR *)dsn, sizeof(dsn), &len_dsn, (SQLWCHAR *)desc, + sizeof(desc), &len_desc )))) { dir = SQL_FETCH_NEXT; if (len_dsn == lstrlenW( dsn ) && len_desc == lstrlenW( desc )) @@ -438,12 +312,12 @@ static void replicate_to_registry(void) SQLHENV env; SQLRETURN ret;
- if (!(ret = pSQLAllocEnv( &env ))) + if (!(ret = SQLAllocEnv( &env ))) { replicate_odbcinst_to_registry( env ); replicate_odbc_to_registry( FALSE /* system dsn */, env ); replicate_odbc_to_registry( TRUE /* user dsn */, env ); - pSQLFreeEnv( env ); + SQLFreeEnv( env ); } else { @@ -452,1070 +326,829 @@ static void replicate_to_registry(void) } }
-static NTSTATUS load_odbc(void); - static NTSTATUS odbc_process_attach( void *args ) { - if (load_odbc()) return STATUS_DLL_NOT_FOUND; replicate_to_registry(); return STATUS_SUCCESS; }
-static NTSTATUS odbc_process_detach( void *args ) -{ - if (libodbc) dlclose( libodbc ); - libodbc = NULL; - return STATUS_SUCCESS; -} - static NTSTATUS wrap_SQLAllocConnect( void *args ) { struct SQLAllocConnect_params *params = args; - - if (!pSQLAllocConnect) return SQL_ERROR; - return pSQLAllocConnect( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC *)¶ms->ConnectionHandle ); + return SQLAllocConnect( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC *)¶ms->ConnectionHandle ); }
static NTSTATUS wrap_SQLAllocEnv( void *args ) { struct SQLAllocEnv_params *params = args; - - if (!pSQLAllocEnv) return SQL_ERROR; - return pSQLAllocEnv( (SQLHENV *)¶ms->EnvironmentHandle ); + return SQLAllocEnv( (SQLHENV *)¶ms->EnvironmentHandle ); }
static NTSTATUS wrap_SQLAllocHandle( void *args ) { struct SQLAllocHandle_params *params = args; - - if (!pSQLAllocHandle) return SQL_ERROR; - return pSQLAllocHandle( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->InputHandle, - (SQLHANDLE *)¶ms->OutputHandle ); + return SQLAllocHandle( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->InputHandle, + (SQLHANDLE *)¶ms->OutputHandle ); }
static NTSTATUS wrap_SQLAllocHandleStd( void *args ) { struct SQLAllocHandleStd_params *params = args; - - if (!pSQLAllocHandleStd) return SQL_ERROR; - return pSQLAllocHandleStd( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->InputHandle, - (SQLHANDLE *)¶ms->OutputHandle ); + return SQLAllocHandleStd( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->InputHandle, + (SQLHANDLE *)¶ms->OutputHandle ); }
static NTSTATUS wrap_SQLAllocStmt( void *args ) { struct SQLAllocStmt_params *params = args; - - if (!pSQLAllocStmt) return SQL_ERROR; - return pSQLAllocStmt( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, (SQLHSTMT *)¶ms->StatementHandle ); + return SQLAllocStmt( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, (SQLHSTMT *)¶ms->StatementHandle ); }
static NTSTATUS wrap_SQLBindCol( void *args ) { struct SQLBindCol_params *params = args; - - if (!pSQLBindCol) return SQL_ERROR; - return pSQLBindCol( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->TargetType, - params->TargetValue, params->BufferLength, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); + return SQLBindCol( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->TargetType, + params->TargetValue, params->BufferLength, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLBindParam( void *args ) { struct SQLBindParam_params *params = args; - - if (!pSQLBindParam) return SQL_ERROR; - return pSQLBindParam( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, params->ValueType, - params->ParameterType, params->LengthPrecision, params->ParameterScale, - params->ParameterValue, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); + return SQLBindParam( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, params->ValueType, + params->ParameterType, params->LengthPrecision, params->ParameterScale, + params->ParameterValue, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLBindParameter( void *args ) { struct SQLBindParameter_params *params = args; - - if (!pSQLBindParameter) return SQL_ERROR; - return pSQLBindParameter( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, - params->InputOutputType, params->ValueType, params->ParameterType, params->ColumnSize, - params->DecimalDigits, params->ParameterValue, params->BufferLength, - (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); + return SQLBindParameter( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, + params->InputOutputType, params->ValueType, params->ParameterType, params->ColumnSize, + params->DecimalDigits, params->ParameterValue, params->BufferLength, + (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLBrowseConnect( void *args ) { struct SQLBrowseConnect_params *params = args; - - if (!pSQLBrowseConnect) return SQL_ERROR; - return pSQLBrowseConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InConnectionString, - params->StringLength1, params->OutConnectionString, params->BufferLength, - params->StringLength2 ); + return SQLBrowseConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InConnectionString, + params->StringLength1, params->OutConnectionString, params->BufferLength, + params->StringLength2 ); }
static NTSTATUS wrap_SQLBrowseConnectW( void *args ) { struct SQLBrowseConnectW_params *params = args; - - if (!pSQLBrowseConnectW) return SQL_ERROR; - return pSQLBrowseConnectW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InConnectionString, - params->StringLength1, params->OutConnectionString, params->BufferLength, - params->StringLength2 ); + return SQLBrowseConnectW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InConnectionString, + params->StringLength1, params->OutConnectionString, params->BufferLength, + params->StringLength2 ); }
static NTSTATUS wrap_SQLBulkOperations( void *args ) { struct SQLBulkOperations_params *params = args; - - if (!pSQLBulkOperations) return SQL_ERROR; - return pSQLBulkOperations( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Operation ); + return SQLBulkOperations( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Operation ); }
static NTSTATUS wrap_SQLCancel( void *args ) { struct SQLCancel_params *params = args; - - if (!pSQLCancel) return SQL_ERROR; - return pSQLCancel( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); + return SQLCancel( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); }
static NTSTATUS wrap_SQLCloseCursor( void *args ) { struct SQLCloseCursor_params *params = args; - - if (!pSQLCloseCursor) return SQL_ERROR; - return pSQLCloseCursor( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); + return SQLCloseCursor( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); }
static NTSTATUS wrap_SQLColAttribute( void *args ) { struct SQLColAttribute_params *params = args; - - if (!pSQLColAttribute) return SQL_ERROR; - return pSQLColAttribute( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, - params->FieldIdentifier, params->CharacterAttribute, params->BufferLength, - params->StringLength, (SQLLEN *)(ULONG_PTR)params->NumericAttribute ); + return SQLColAttribute( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, + params->FieldIdentifier, params->CharacterAttribute, params->BufferLength, + params->StringLength, (SQLLEN *)(ULONG_PTR)params->NumericAttribute ); }
static NTSTATUS wrap_SQLColAttributeW( void *args ) { struct SQLColAttributeW_params *params = args; - - if (!pSQLColAttributeW) return SQL_ERROR; - return pSQLColAttributeW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, - params->FieldIdentifier, params->CharacterAttribute, - params->BufferLength, params->StringLength, - (SQLLEN *)(ULONG_PTR)params->NumericAttribute ); + return SQLColAttributeW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, + params->FieldIdentifier, params->CharacterAttribute, + params->BufferLength, params->StringLength, + (SQLLEN *)(ULONG_PTR)params->NumericAttribute ); }
static NTSTATUS wrap_SQLColAttributes( void *args ) { struct SQLColAttributes_params *params = args; - - if (!pSQLColAttributes) return SQL_ERROR; - return pSQLColAttributes( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, - params->FieldIdentifier, params->CharacterAttributes, params->BufferLength, - params->StringLength, (SQLLEN *)(ULONG_PTR)params->NumericAttributes ); + return SQLColAttributes( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, + params->FieldIdentifier, params->CharacterAttributes, params->BufferLength, + params->StringLength, (SQLLEN *)(ULONG_PTR)params->NumericAttributes ); }
static NTSTATUS wrap_SQLColAttributesW( void *args ) { struct SQLColAttributesW_params *params = args; - - if (!pSQLColAttributesW) return SQL_ERROR; - return pSQLColAttributesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, - params->FieldIdentifier, params->CharacterAttributes, params->BufferLength, - params->StringLength, (SQLLEN *)(ULONG_PTR)params->NumericAttributes ); + return SQLColAttributesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, + params->FieldIdentifier, params->CharacterAttributes, params->BufferLength, + params->StringLength, (SQLLEN *)(ULONG_PTR)params->NumericAttributes ); }
static NTSTATUS wrap_SQLColumnPrivileges( void *args ) { struct SQLColumnPrivileges_params *params = args; - - if (!pSQLColumnPrivileges) return SQL_ERROR; - return pSQLColumnPrivileges( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, - params->NameLength1, params->SchemaName, params->NameLength2, - params->TableName, params->NameLength3, params->ColumnName, params->NameLength4 ); + return SQLColumnPrivileges( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, + params->TableName, params->NameLength3, params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLColumnPrivilegesW( void *args ) { struct SQLColumnPrivilegesW_params *params = args; - - if (!pSQLColumnPrivilegesW) return SQL_ERROR; - return pSQLColumnPrivilegesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, - params->NameLength1, params->SchemaName, params->NameLength2, - params->TableName, params->NameLength3, params->ColumnName, params->NameLength4 ); + return SQLColumnPrivilegesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, + params->TableName, params->NameLength3, params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLColumns( void *args ) { struct SQLColumns_params *params = args; - - if (!pSQLColumns) return SQL_ERROR; - return pSQLColumns( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, params->NameLength3, - params->ColumnName, params->NameLength4 ); + return SQLColumns( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, params->NameLength3, + params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLColumnsW( void *args ) { struct SQLColumnsW_params *params = args; - - if (!pSQLColumnsW) return SQL_ERROR; - return pSQLColumnsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, params->NameLength3, - params->ColumnName, params->NameLength4 ); + return SQLColumnsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, params->NameLength3, + params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLConnect( void *args ) { struct SQLConnect_params *params = args; - - if (!pSQLConnect) return SQL_ERROR; - return pSQLConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->ServerName, params->NameLength1, - params->UserName, params->NameLength2, params->Authentication, params->NameLength3 ); + return SQLConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->ServerName, params->NameLength1, + params->UserName, params->NameLength2, params->Authentication, params->NameLength3 ); }
static NTSTATUS wrap_SQLConnectW( void *args ) { struct SQLConnectW_params *params = args; - - if (!pSQLConnectW) return SQL_ERROR; - return pSQLConnectW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->ServerName, params->NameLength1, - params->UserName, params->NameLength2, params->Authentication, params->NameLength3 ); + return SQLConnectW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->ServerName, params->NameLength1, + params->UserName, params->NameLength2, params->Authentication, params->NameLength3 ); }
static NTSTATUS wrap_SQLCopyDesc( void *args ) { struct SQLCopyDesc_params *params = args; - - if (!pSQLCopyDesc) return SQL_ERROR; - return pSQLCopyDesc( (SQLHDESC)(ULONG_PTR)params->SourceDescHandle, (SQLHDESC)(ULONG_PTR)params->TargetDescHandle ); + return SQLCopyDesc( (SQLHDESC)(ULONG_PTR)params->SourceDescHandle, (SQLHDESC)(ULONG_PTR)params->TargetDescHandle ); }
static NTSTATUS wrap_SQLDataSources( void *args ) { struct SQLDataSources_params *params = args; - - if (!pSQLDataSources) return SQL_ERROR; - return pSQLDataSources( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->ServerName, - params->BufferLength1, params->NameLength1, params->Description, - params->BufferLength2, params->NameLength2 ); + return SQLDataSources( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->ServerName, + params->BufferLength1, params->NameLength1, params->Description, + params->BufferLength2, params->NameLength2 ); }
static NTSTATUS wrap_SQLDataSourcesW( void *args ) { struct SQLDataSourcesW_params *params = args; - - if (!pSQLDataSourcesW) return SQL_ERROR; - return pSQLDataSourcesW( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->ServerName, - params->BufferLength1, params->NameLength1, params->Description, - params->BufferLength2, params->NameLength2 ); + return SQLDataSourcesW( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->ServerName, + params->BufferLength1, params->NameLength1, params->Description, + params->BufferLength2, params->NameLength2 ); }
static NTSTATUS wrap_SQLDescribeCol( void *args ) { struct SQLDescribeCol_params *params = args; - - if (!pSQLDescribeCol) return SQL_ERROR; - return pSQLDescribeCol( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->ColumnName, - params->BufferLength, params->NameLength, params->DataType, - (SQLULEN *)(ULONG_PTR)params->ColumnSize, params->DecimalDigits, params->Nullable ); + return SQLDescribeCol( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->ColumnName, + params->BufferLength, params->NameLength, params->DataType, + (SQLULEN *)(ULONG_PTR)params->ColumnSize, params->DecimalDigits, params->Nullable ); }
static NTSTATUS wrap_SQLDescribeColW( void *args ) { struct SQLDescribeColW_params *params = args; - - if (!pSQLDescribeColW) return SQL_ERROR; - return pSQLDescribeColW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->ColumnName, - params->BufferLength, params->NameLength, params->DataType, - (SQLULEN *)(ULONG_PTR)params->ColumnSize, params->DecimalDigits, params->Nullable ); + return SQLDescribeColW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->ColumnName, + params->BufferLength, params->NameLength, params->DataType, + (SQLULEN *)(ULONG_PTR)params->ColumnSize, params->DecimalDigits, params->Nullable ); }
static NTSTATUS wrap_SQLDescribeParam( void *args ) { struct SQLDescribeParam_params *params = args; - - if (!pSQLDescribeParam) return SQL_ERROR; - return pSQLDescribeParam( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, params->DataType, - (SQLULEN *)(ULONG_PTR)params->ParameterSize, params->DecimalDigits, params->Nullable ); + return SQLDescribeParam( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, params->DataType, + (SQLULEN *)(ULONG_PTR)params->ParameterSize, params->DecimalDigits, params->Nullable ); }
static NTSTATUS wrap_SQLDisconnect( void *args ) { struct SQLDisconnect_params *params = args; - - if (!pSQLDisconnect) return SQL_ERROR; - return pSQLDisconnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle ); + return SQLDisconnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle ); }
static NTSTATUS wrap_SQLDriverConnect( void *args ) { struct SQLDriverConnect_params *params = args; - - if (!pSQLDriverConnect) return SQL_ERROR; - return pSQLDriverConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, (SQLHWND)(ULONG_PTR)params->WindowHandle, - params->ConnectionString, params->Length, params->OutConnectionString, - params->BufferLength, params->Length2, params->DriverCompletion ); + return SQLDriverConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, (SQLHWND)(ULONG_PTR)params->WindowHandle, + params->ConnectionString, params->Length, params->OutConnectionString, + params->BufferLength, params->Length2, params->DriverCompletion ); }
static NTSTATUS wrap_SQLDriverConnectW( void *args ) { struct SQLDriverConnectW_params *params = args; - - if (!pSQLDriverConnectW) return SQL_ERROR; - return pSQLDriverConnectW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, (SQLHWND)(ULONG_PTR)params->WindowHandle, - params->InConnectionString, params->Length, params->OutConnectionString, - params->BufferLength, params->Length2, params->DriverCompletion ); + return SQLDriverConnectW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, (SQLHWND)(ULONG_PTR)params->WindowHandle, + params->InConnectionString, params->Length, params->OutConnectionString, + params->BufferLength, params->Length2, params->DriverCompletion ); }
static NTSTATUS wrap_SQLDrivers( void *args ) { struct SQLDrivers_params *params = args; - - if (!pSQLDrivers) return SQL_ERROR; - return pSQLDrivers( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->DriverDescription, - params->BufferLength1, params->DescriptionLength, params->DriverAttributes, - params->BufferLength2, params->AttributesLength ); + return SQLDrivers( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->DriverDescription, + params->BufferLength1, params->DescriptionLength, params->DriverAttributes, + params->BufferLength2, params->AttributesLength ); }
static NTSTATUS wrap_SQLDriversW( void *args ) { struct SQLDriversW_params *params = args; - - if (!pSQLDriversW) return SQL_ERROR; - return pSQLDriversW( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->DriverDescription, - params->BufferLength1, params->DescriptionLength, params->DriverAttributes, - params->BufferLength2, params->AttributesLength ); + return SQLDriversW( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Direction, params->DriverDescription, + params->BufferLength1, params->DescriptionLength, params->DriverAttributes, + params->BufferLength2, params->AttributesLength ); }
static NTSTATUS wrap_SQLEndTran( void *args ) { struct SQLEndTran_params *params = args; - - if (!pSQLEndTran) return SQL_ERROR; - return pSQLEndTran( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->CompletionType ); + return SQLEndTran( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->CompletionType ); }
static NTSTATUS wrap_SQLError( void *args ) { struct SQLError_params *params = args; - - if (!pSQLError) return SQL_ERROR; - return pSQLError( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, - (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->SqlState, params->NativeError, - params->MessageText, params->BufferLength, params->TextLength ); + return SQLError( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, + (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->SqlState, params->NativeError, + params->MessageText, params->BufferLength, params->TextLength ); }
static NTSTATUS wrap_SQLErrorW( void *args ) { struct SQLErrorW_params *params = args; - - if (!pSQLErrorW) return SQL_ERROR; - return pSQLErrorW( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, - (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->SqlState, params->NativeError, - params->MessageText, params->BufferLength, params->TextLength ); + return SQLErrorW( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, + (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->SqlState, params->NativeError, + params->MessageText, params->BufferLength, params->TextLength ); }
static NTSTATUS wrap_SQLExecDirect( void *args ) { struct SQLExecDirect_params *params = args; - - if (!pSQLExecDirect) return SQL_ERROR; - return pSQLExecDirect( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); + return SQLExecDirect( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); }
static NTSTATUS wrap_SQLExecDirectW( void *args ) { struct SQLExecDirectW_params *params = args; - - if (!pSQLExecDirectW) return SQL_ERROR; - return pSQLExecDirectW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); + return SQLExecDirectW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); }
static NTSTATUS wrap_SQLExecute( void *args ) { struct SQLExecute_params *params = args; - - if (!pSQLExecute) return SQL_ERROR; - return pSQLExecute( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); + return SQLExecute( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); }
static NTSTATUS wrap_SQLExtendedFetch( void *args ) { struct SQLExtendedFetch_params *params = args; - - if (!pSQLExtendedFetch) return SQL_ERROR; - return pSQLExtendedFetch( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->FetchOrientation, - params->FetchOffset, (SQLULEN *)(ULONG_PTR)params->RowCount, params->RowStatusArray ); + return SQLExtendedFetch( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->FetchOrientation, + params->FetchOffset, (SQLULEN *)(ULONG_PTR)params->RowCount, params->RowStatusArray ); }
static NTSTATUS wrap_SQLFetch( void *args ) { struct SQLFetch_params *params = args; - - if (!pSQLFetch) return SQL_ERROR; - return pSQLFetch( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); + return SQLFetch( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); }
static NTSTATUS wrap_SQLFetchScroll( void *args ) { struct SQLFetchScroll_params *params = args; - - if (!pSQLFetchScroll) return SQL_ERROR; - return pSQLFetchScroll( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->FetchOrientation, - params->FetchOffset ); + return SQLFetchScroll( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->FetchOrientation, + params->FetchOffset ); }
static NTSTATUS wrap_SQLForeignKeys( void *args ) { struct SQLForeignKeys_params *params = args; - - if (!pSQLForeignKeys) return SQL_ERROR; - return pSQLForeignKeys( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->PkCatalogName, - params->NameLength1, params->PkSchemaName, params->NameLength2, - params->PkTableName, params->NameLength3, params->FkCatalogName, - params->NameLength4, params->FkSchemaName, params->NameLength5, - params->FkTableName, params->NameLength6 ); + return SQLForeignKeys( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->PkCatalogName, + params->NameLength1, params->PkSchemaName, params->NameLength2, + params->PkTableName, params->NameLength3, params->FkCatalogName, + params->NameLength4, params->FkSchemaName, params->NameLength5, + params->FkTableName, params->NameLength6 ); }
static NTSTATUS wrap_SQLForeignKeysW( void *args ) { struct SQLForeignKeysW_params *params = args; - - if (!pSQLForeignKeysW) return SQL_ERROR; - return pSQLForeignKeysW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->PkCatalogName, - params->NameLength1, params->PkSchemaName, params->NameLength2, - params->PkTableName, params->NameLength3, params->FkCatalogName, - params->NameLength4, params->FkSchemaName, params->NameLength5, - params->FkTableName, params->NameLength6 ); + return SQLForeignKeysW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->PkCatalogName, + params->NameLength1, params->PkSchemaName, params->NameLength2, + params->PkTableName, params->NameLength3, params->FkCatalogName, + params->NameLength4, params->FkSchemaName, params->NameLength5, + params->FkTableName, params->NameLength6 ); }
static NTSTATUS wrap_SQLFreeConnect( void *args ) { struct SQLFreeConnect_params *params = args; - - if (!pSQLFreeConnect) return SQL_ERROR; - return pSQLFreeConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle ); + return SQLFreeConnect( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle ); }
static NTSTATUS wrap_SQLFreeEnv( void *args ) { struct SQLFreeEnv_params *params = args; - - if (!pSQLFreeEnv) return SQL_ERROR; - return pSQLFreeEnv( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle ); + return SQLFreeEnv( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle ); }
static NTSTATUS wrap_SQLFreeHandle( void *args ) { struct SQLFreeHandle_params *params = args; - - if (!pSQLFreeHandle) return SQL_ERROR; - return pSQLFreeHandle( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle ); + return SQLFreeHandle( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle ); }
static NTSTATUS wrap_SQLFreeStmt( void *args ) { struct SQLFreeStmt_params *params = args; - - if (!pSQLFreeStmt) return SQL_ERROR; - return pSQLFreeStmt( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Option ); + return SQLFreeStmt( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Option ); }
static NTSTATUS wrap_SQLGetConnectAttr( void *args ) { struct SQLGetConnectAttr_params *params = args; - - if (!pSQLGetConnectAttr) return SQL_ERROR; - return pSQLGetConnectAttr( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, - params->BufferLength, params->StringLength ); + return SQLGetConnectAttr( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetConnectAttrW( void *args ) { struct SQLGetConnectAttrW_params *params = args; - - if (!pSQLGetConnectAttrW) return SQL_ERROR; - return pSQLGetConnectAttrW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, - params->BufferLength, params->StringLength ); + return SQLGetConnectAttrW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetConnectOption( void *args ) { struct SQLGetConnectOption_params *params = args; - - if (!pSQLGetConnectOption) return SQL_ERROR; - return pSQLGetConnectOption( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); + return SQLGetConnectOption( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLGetConnectOptionW( void *args ) { struct SQLGetConnectOptionW_params *params = args; - - if (!pSQLGetConnectOptionW) return SQL_ERROR; - return pSQLGetConnectOptionW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); + return SQLGetConnectOptionW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLGetCursorName( void *args ) { struct SQLGetCursorName_params *params = args; - - if (!pSQLGetCursorName) return SQL_ERROR; - return pSQLGetCursorName( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->BufferLength, - params->NameLength ); + return SQLGetCursorName( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->BufferLength, + params->NameLength ); }
static NTSTATUS wrap_SQLGetCursorNameW( void *args ) { struct SQLGetCursorNameW_params *params = args; - - if (!pSQLGetCursorNameW) return SQL_ERROR; - return pSQLGetCursorNameW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->BufferLength, - params->NameLength ); + return SQLGetCursorNameW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->BufferLength, + params->NameLength ); }
static NTSTATUS wrap_SQLGetData( void *args ) { struct SQLGetData_params *params = args; - - if (!pSQLGetData) return SQL_ERROR; - return pSQLGetData( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->TargetType, - params->TargetValue, params->BufferLength, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); + return SQLGetData( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnNumber, params->TargetType, + params->TargetValue, params->BufferLength, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLGetDescField( void *args ) { struct SQLGetDescField_params *params = args; - - if (!pSQLGetDescField) return SQL_ERROR; - return pSQLGetDescField( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, - params->Value, params->BufferLength, params->StringLength ); + return SQLGetDescField( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, + params->Value, params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetDescFieldW( void *args ) { struct SQLGetDescFieldW_params *params = args; - - if (!pSQLGetDescFieldW) return SQL_ERROR; - return pSQLGetDescFieldW( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, - params->Value, params->BufferLength, params->StringLength ); + return SQLGetDescFieldW( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, + params->Value, params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetDescRec( void *args ) { struct SQLGetDescRec_params *params = args; - - if (!pSQLGetDescRec) return SQL_ERROR; - return pSQLGetDescRec( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->Name, - params->BufferLength, params->StringLength, params->Type, params->SubType, - (SQLLEN *)(ULONG_PTR)params->Length, params->Precision, params->Scale, params->Nullable ); + return SQLGetDescRec( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->Name, + params->BufferLength, params->StringLength, params->Type, params->SubType, + (SQLLEN *)(ULONG_PTR)params->Length, params->Precision, params->Scale, params->Nullable ); }
static NTSTATUS wrap_SQLGetDescRecW( void *args ) { struct SQLGetDescRecW_params *params = args; - - if (!pSQLGetDescRecW) return SQL_ERROR; - return pSQLGetDescRecW( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->Name, - params->BufferLength, params->StringLength, params->Type, params->SubType, - (SQLLEN *)(ULONG_PTR)params->Length, params->Precision, params->Scale, params->Nullable ); + return SQLGetDescRecW( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->Name, + params->BufferLength, params->StringLength, params->Type, params->SubType, + (SQLLEN *)(ULONG_PTR)params->Length, params->Precision, params->Scale, params->Nullable ); }
static NTSTATUS wrap_SQLGetDiagField( void *args ) { struct SQLGetDiagField_params *params = args; - - if (!pSQLGetDiagField) return SQL_ERROR; - return pSQLGetDiagField( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, - params->DiagIdentifier, params->DiagInfo, params->BufferLength, params->StringLength ); + return SQLGetDiagField( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, + params->DiagIdentifier, params->DiagInfo, params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetDiagFieldW( void *args ) { struct SQLGetDiagFieldW_params *params = args; - - if (!pSQLGetDiagFieldW) return SQL_ERROR; - return pSQLGetDiagFieldW( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, - params->DiagIdentifier, params->DiagInfo, params->BufferLength, params->StringLength ); + return SQLGetDiagFieldW( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, + params->DiagIdentifier, params->DiagInfo, params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetDiagRec( void *args ) { struct SQLGetDiagRec_params *params = args; - - if (!pSQLGetDiagRec) return SQL_ERROR; - return pSQLGetDiagRec( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, params->SqlState, - params->NativeError, params->MessageText, params->BufferLength, params->TextLength ); + return SQLGetDiagRec( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, params->SqlState, + params->NativeError, params->MessageText, params->BufferLength, params->TextLength ); }
static NTSTATUS wrap_SQLGetDiagRecW( void *args ) { struct SQLGetDiagRecW_params *params = args; - - if (!pSQLGetDiagRecW) return SQL_ERROR; - return pSQLGetDiagRecW( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, params->SqlState, - params->NativeError, params->MessageText, params->BufferLength, params->TextLength ); + return SQLGetDiagRecW( params->HandleType, (SQLHANDLE)(ULONG_PTR)params->Handle, params->RecNumber, params->SqlState, + params->NativeError, params->MessageText, params->BufferLength, params->TextLength ); }
static NTSTATUS wrap_SQLGetEnvAttr( void *args ) { struct SQLGetEnvAttr_params *params = args; - - if (!pSQLGetEnvAttr) return SQL_ERROR; - return pSQLGetEnvAttr( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Attribute, - params->Value, params->BufferLength, params->StringLength ); + return SQLGetEnvAttr( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Attribute, + params->Value, params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetFunctions( void *args ) { struct SQLGetFunctions_params *params = args; - - if (!pSQLGetFunctions) return SQL_ERROR; - return pSQLGetFunctions( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->FunctionId, params->Supported ); + return SQLGetFunctions( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->FunctionId, params->Supported ); }
static NTSTATUS wrap_SQLGetInfo( void *args ) { struct SQLGetInfo_params *params = args; - - if (!pSQLGetInfo) return SQL_ERROR; - return pSQLGetInfo( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InfoType, params->InfoValue, - params->BufferLength, params->StringLength ); + return SQLGetInfo( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InfoType, params->InfoValue, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetInfoW( void *args ) { struct SQLGetInfoW_params *params = args; - - if (!pSQLGetInfoW) return SQL_ERROR; - return pSQLGetInfoW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InfoType, params->InfoValue, - params->BufferLength, params->StringLength ); + return SQLGetInfoW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InfoType, params->InfoValue, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetStmtAttr( void *args ) { struct SQLGetStmtAttr_params *params = args; - - if (!pSQLGetStmtAttr) return SQL_ERROR; - return pSQLGetStmtAttr( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, - params->BufferLength, params->StringLength ); + return SQLGetStmtAttr( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetStmtAttrW( void *args ) { struct SQLGetStmtAttrW_params *params = args; - - if (!pSQLGetStmtAttrW) return SQL_ERROR; - return pSQLGetStmtAttrW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, - params->BufferLength, params->StringLength ); + return SQLGetStmtAttrW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, + params->BufferLength, params->StringLength ); }
static NTSTATUS wrap_SQLGetStmtOption( void *args ) { struct SQLGetStmtOption_params *params = args; - - if (!pSQLGetStmtOption) return SQL_ERROR; - return pSQLGetStmtOption( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Option, params->Value ); + return SQLGetStmtOption( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLGetTypeInfo( void *args ) { struct SQLGetTypeInfo_params *params = args; - - if (!pSQLGetTypeInfo) return SQL_ERROR; - return pSQLGetTypeInfo( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->DataType ); + return SQLGetTypeInfo( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->DataType ); }
static NTSTATUS wrap_SQLGetTypeInfoW( void *args ) { struct SQLGetTypeInfoW_params *params = args; - - if (!pSQLGetTypeInfoW) return SQL_ERROR; - return pSQLGetTypeInfoW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->DataType ); + return SQLGetTypeInfoW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->DataType ); }
static NTSTATUS wrap_SQLMoreResults( void *args ) { struct SQLMoreResults_params *params = args; - - if (!pSQLMoreResults) return SQL_ERROR; - return pSQLMoreResults( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); + return SQLMoreResults( (SQLHSTMT)(ULONG_PTR)params->StatementHandle ); }
static NTSTATUS wrap_SQLNativeSql( void *args ) { struct SQLNativeSql_params *params = args; - - if (!pSQLNativeSql) return SQL_ERROR; - return pSQLNativeSql( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InStatementText, params->TextLength1, - params->OutStatementText, params->BufferLength, params->TextLength2 ); + return SQLNativeSql( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InStatementText, params->TextLength1, + params->OutStatementText, params->BufferLength, params->TextLength2 ); }
static NTSTATUS wrap_SQLNativeSqlW( void *args ) { struct SQLNativeSqlW_params *params = args; - - if (!pSQLNativeSqlW) return SQL_ERROR; - return pSQLNativeSqlW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InStatementText, params->TextLength1, - params->OutStatementText, params->BufferLength, params->TextLength2 ); + return SQLNativeSqlW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->InStatementText, params->TextLength1, + params->OutStatementText, params->BufferLength, params->TextLength2 ); }
static NTSTATUS wrap_SQLNumParams( void *args ) { struct SQLNumParams_params *params = args; - - if (!pSQLNumParams) return SQL_ERROR; - return pSQLNumParams( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterCount ); + return SQLNumParams( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterCount ); }
static NTSTATUS wrap_SQLNumResultCols( void *args ) { struct SQLNumResultCols_params *params = args; - - if (!pSQLNumResultCols) return SQL_ERROR; - return pSQLNumResultCols( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnCount ); + return SQLNumResultCols( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ColumnCount ); }
static NTSTATUS wrap_SQLParamData( void *args ) { struct SQLParamData_params *params = args; - - if (!pSQLParamData) return SQL_ERROR; - return pSQLParamData( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Value ); + return SQLParamData( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Value ); }
static NTSTATUS wrap_SQLParamOptions( void *args ) { struct SQLParamOptions_params *params = args; - - if (!pSQLParamOptions) return SQL_ERROR; - return pSQLParamOptions( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->RowCount, - (SQLULEN *)(ULONG_PTR)params->RowNumber ); + return SQLParamOptions( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->RowCount, + (SQLULEN *)(ULONG_PTR)params->RowNumber ); }
static NTSTATUS wrap_SQLPrepare( void *args ) { struct SQLPrepare_params *params = args; - - if (!pSQLPrepare) return SQL_ERROR; - return pSQLPrepare( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); + return SQLPrepare( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); }
static NTSTATUS wrap_SQLPrepareW( void *args ) { struct SQLPrepareW_params *params = args; - - if (!pSQLPrepareW) return SQL_ERROR; - return pSQLPrepareW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); + return SQLPrepareW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->StatementText, params->TextLength ); }
static NTSTATUS wrap_SQLPrimaryKeys( void *args ) { struct SQLPrimaryKeys_params *params = args; - - if (!pSQLPrimaryKeys) return SQL_ERROR; - return pSQLPrimaryKeys( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, params->NameLength3 ); + return SQLPrimaryKeys( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, params->NameLength3 ); }
static NTSTATUS wrap_SQLPrimaryKeysW( void *args ) { struct SQLPrimaryKeysW_params *params = args; - - if (!pSQLPrimaryKeysW) return SQL_ERROR; - return pSQLPrimaryKeysW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, params->NameLength3 ); + return SQLPrimaryKeysW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, params->NameLength3 ); }
static NTSTATUS wrap_SQLProcedureColumns( void *args ) { struct SQLProcedureColumns_params *params = args; - - if (!pSQLProcedureColumns) return SQL_ERROR; - return pSQLProcedureColumns( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, - params->NameLength1, params->SchemaName, params->NameLength2, params->ProcName, - params->NameLength3, params->ColumnName, params->NameLength4 ); + return SQLProcedureColumns( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, params->ProcName, + params->NameLength3, params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLProcedureColumnsW( void *args ) { struct SQLProcedureColumnsW_params *params = args; - - if (!pSQLProcedureColumnsW) return SQL_ERROR; - return pSQLProcedureColumnsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, - params->NameLength1, params->SchemaName, params->NameLength2, params->ProcName, - params->NameLength3, params->ColumnName, params->NameLength4 ); + return SQLProcedureColumnsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, params->ProcName, + params->NameLength3, params->ColumnName, params->NameLength4 ); }
static NTSTATUS wrap_SQLProcedures( void *args ) { struct SQLProcedures_params *params = args; - - if (!pSQLProcedures) return SQL_ERROR; - return pSQLProcedures( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->ProcName, params->NameLength3 ); + return SQLProcedures( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->ProcName, params->NameLength3 ); }
static NTSTATUS wrap_SQLProceduresW( void *args ) { struct SQLProceduresW_params *params = args; - - if (!pSQLProceduresW) return SQL_ERROR; - return pSQLProceduresW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->ProcName, params->NameLength3 ); + return SQLProceduresW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->ProcName, params->NameLength3 ); }
static NTSTATUS wrap_SQLPutData( void *args ) { struct SQLPutData_params *params = args; - - if (!pSQLPutData) return SQL_ERROR; - return pSQLPutData( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Data, params->StrLen_or_Ind ); + return SQLPutData( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Data, params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLRowCount( void *args ) { struct SQLRowCount_params *params = args; - - if (!pSQLRowCount) return SQL_ERROR; - return pSQLRowCount( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, (SQLLEN *)(ULONG_PTR)params->RowCount ); + return SQLRowCount( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, (SQLLEN *)(ULONG_PTR)params->RowCount ); }
static NTSTATUS wrap_SQLSetConnectAttr( void *args ) { struct SQLSetConnectAttr_params *params = args; - - if (!pSQLSetConnectAttr) return SQL_ERROR; - return pSQLSetConnectAttr( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, - params->StringLength ); + return SQLSetConnectAttr( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, + params->StringLength ); }
static NTSTATUS wrap_SQLSetConnectAttrW( void *args ) { struct SQLSetConnectAttrW_params *params = args; - - if (!pSQLSetConnectAttrW) return SQL_ERROR; - return pSQLSetConnectAttrW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, - params->StringLength ); + return SQLSetConnectAttrW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Attribute, params->Value, + params->StringLength ); }
static NTSTATUS wrap_SQLSetConnectOption( void *args ) { struct SQLSetConnectOption_params *params = args; - - if (!pSQLSetConnectOption) return SQL_ERROR; - return pSQLSetConnectOption( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); + return SQLSetConnectOption( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLSetConnectOptionW( void *args ) { struct SQLSetConnectOptionW_params *params = args; - - if (!pSQLSetConnectOptionW) return SQL_ERROR; - return pSQLSetConnectOptionW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); + return SQLSetConnectOptionW( (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLSetCursorName( void *args ) { struct SQLSetCursorName_params *params = args; - - if (!pSQLSetCursorName) return SQL_ERROR; - return pSQLSetCursorName( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->NameLength ); + return SQLSetCursorName( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->NameLength ); }
static NTSTATUS wrap_SQLSetCursorNameW( void *args ) { struct SQLSetCursorNameW_params *params = args; - - if (!pSQLSetCursorNameW) return SQL_ERROR; - return pSQLSetCursorNameW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->NameLength ); + return SQLSetCursorNameW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CursorName, params->NameLength ); }
static NTSTATUS wrap_SQLSetDescField( void *args ) { struct SQLSetDescField_params *params = args; - - if (!pSQLSetDescField) return SQL_ERROR; - return pSQLSetDescField( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, - params->Value, params->BufferLength ); + return SQLSetDescField( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, + params->Value, params->BufferLength ); }
static NTSTATUS wrap_SQLSetDescFieldW( void *args ) { struct SQLSetDescFieldW_params *params = args; - - if (!pSQLSetDescFieldW) return SQL_ERROR; - return pSQLSetDescFieldW( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, - params->Value, params->BufferLength ); + return SQLSetDescFieldW( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->FieldIdentifier, + params->Value, params->BufferLength ); }
static NTSTATUS wrap_SQLSetDescRec( void *args ) { struct SQLSetDescRec_params *params = args; - - if (!pSQLSetDescRec) return SQL_ERROR; - return pSQLSetDescRec( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->Type, - params->SubType, params->Length, params->Precision, params->Scale, - params->Data, (SQLLEN *)(ULONG_PTR)params->StringLength, - (SQLLEN *)(ULONG_PTR)params->Indicator ); + return SQLSetDescRec( (SQLHDESC)(ULONG_PTR)params->DescriptorHandle, params->RecNumber, params->Type, + params->SubType, params->Length, params->Precision, params->Scale, + params->Data, (SQLLEN *)(ULONG_PTR)params->StringLength, + (SQLLEN *)(ULONG_PTR)params->Indicator ); }
static NTSTATUS wrap_SQLSetEnvAttr( void *args ) { struct SQLSetEnvAttr_params *params = args; - - if (!pSQLSetEnvAttr) return SQL_ERROR; - return pSQLSetEnvAttr( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Attribute, params->Value, - params->StringLength ); + return SQLSetEnvAttr( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, params->Attribute, params->Value, + params->StringLength ); }
static NTSTATUS wrap_SQLSetParam( void *args ) { struct SQLSetParam_params *params = args; - - if (!pSQLSetParam) return SQL_ERROR; - return pSQLSetParam( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, params->ValueType, - params->ParameterType, params->LengthPrecision, params->ParameterScale, - params->ParameterValue, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); + return SQLSetParam( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->ParameterNumber, params->ValueType, + params->ParameterType, params->LengthPrecision, params->ParameterScale, + params->ParameterValue, (SQLLEN *)(ULONG_PTR)params->StrLen_or_Ind ); }
static NTSTATUS wrap_SQLSetPos( void *args ) { struct SQLSetPos_params *params = args; - - if (!pSQLSetPos) return SQL_ERROR; - return pSQLSetPos( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->RowNumber, params->Operation, - params->LockType ); + return SQLSetPos( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->RowNumber, params->Operation, + params->LockType ); }
static NTSTATUS wrap_SQLSetScrollOptions( void *args ) { struct SQLSetScrollOptions_params *params = args; - - if (!pSQLSetScrollOptions) return SQL_ERROR; - return pSQLSetScrollOptions( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Concurrency, - params->KeySetSize, params->RowSetSize ); + return SQLSetScrollOptions( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Concurrency, + params->KeySetSize, params->RowSetSize ); }
static NTSTATUS wrap_SQLSetStmtAttr( void *args ) { struct SQLSetStmtAttr_params *params = args; - - if (!pSQLSetStmtAttr) return SQL_ERROR; - return pSQLSetStmtAttr( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, - params->StringLength ); + return SQLSetStmtAttr( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, + params->StringLength ); }
static NTSTATUS wrap_SQLSetStmtAttrW( void *args ) { struct SQLSetStmtAttrW_params *params = args; - - if (!pSQLSetStmtAttrW) return SQL_ERROR; - return pSQLSetStmtAttrW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, - params->StringLength ); + return SQLSetStmtAttrW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Attribute, params->Value, + params->StringLength ); }
static NTSTATUS wrap_SQLSetStmtOption( void *args ) { struct SQLSetStmtOption_params *params = args; - - if (!pSQLSetStmtOption) return SQL_ERROR; - return pSQLSetStmtOption( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Option, params->Value ); + return SQLSetStmtOption( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->Option, params->Value ); }
static NTSTATUS wrap_SQLSpecialColumns( void *args ) { struct SQLSpecialColumns_params *params = args; - - if (!pSQLSpecialColumns) return SQL_ERROR; - return pSQLSpecialColumns( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->IdentifierType, - params->CatalogName, params->NameLength1, params->SchemaName, params->NameLength2, - params->TableName, params->NameLength3, params->Scope, params->Nullable ); + return SQLSpecialColumns( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->IdentifierType, + params->CatalogName, params->NameLength1, params->SchemaName, params->NameLength2, + params->TableName, params->NameLength3, params->Scope, params->Nullable ); }
static NTSTATUS wrap_SQLSpecialColumnsW( void *args ) { struct SQLSpecialColumnsW_params *params = args; - - if (!pSQLSpecialColumnsW) return SQL_ERROR; - return pSQLSpecialColumnsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->IdentifierType, - params->CatalogName, params->NameLength1, params->SchemaName, params->NameLength2, - params->TableName, params->NameLength3, params->Scope, params->Nullable ); + return SQLSpecialColumnsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->IdentifierType, + params->CatalogName, params->NameLength1, params->SchemaName, params->NameLength2, + params->TableName, params->NameLength3, params->Scope, params->Nullable ); }
static NTSTATUS wrap_SQLStatistics( void *args ) { struct SQLStatistics_params *params = args; - - if (!pSQLStatistics) return SQL_ERROR; - return pSQLStatistics( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, - params->NameLength3, params->Unique, params->Reserved ); + return SQLStatistics( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3, params->Unique, params->Reserved ); }
static NTSTATUS wrap_SQLStatisticsW( void *args ) { struct SQLStatisticsW_params *params = args; - - if (!pSQLStatisticsW) return SQL_ERROR; - return pSQLStatisticsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, - params->NameLength3, params->Unique, params->Reserved ); + return SQLStatisticsW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3, params->Unique, params->Reserved ); }
static NTSTATUS wrap_SQLTablePrivileges( void *args ) { struct SQLTablePrivileges_params *params = args; - - if (!pSQLTablePrivileges) return SQL_ERROR; - return pSQLTablePrivileges( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, - params->NameLength1, params->SchemaName, params->NameLength2, params->TableName, - params->NameLength3 ); + return SQLTablePrivileges( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3 ); }
static NTSTATUS wrap_SQLTablePrivilegesW( void *args ) { struct SQLTablePrivilegesW_params *params = args; - - if (!pSQLTablePrivilegesW) return SQL_ERROR; - return pSQLTablePrivilegesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, - params->NameLength1, params->SchemaName, params->NameLength2, params->TableName, - params->NameLength3 ); + return SQLTablePrivilegesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, + params->NameLength1, params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3 ); }
static NTSTATUS wrap_SQLTables( void *args ) { struct SQLTables_params *params = args; - - if (!pSQLTables) return SQL_ERROR; - return pSQLTables( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, - params->NameLength3, params->TableType, params->NameLength4 ); + return SQLTables( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3, params->TableType, params->NameLength4 ); }
static NTSTATUS wrap_SQLTablesW( void *args ) { struct SQLTablesW_params *params = args; - - if (!pSQLTablesW) return SQL_ERROR; - return pSQLTablesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, - params->SchemaName, params->NameLength2, params->TableName, - params->NameLength3, params->TableType, params->NameLength4 ); + return SQLTablesW( (SQLHSTMT)(ULONG_PTR)params->StatementHandle, params->CatalogName, params->NameLength1, + params->SchemaName, params->NameLength2, params->TableName, + params->NameLength3, params->TableType, params->NameLength4 ); }
static NTSTATUS wrap_SQLTransact( void *args ) { struct SQLTransact_params *params = args; - - if (!pSQLTransact) return SQL_ERROR; - return pSQLTransact( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, - params->CompletionType ); + return SQLTransact( (SQLHENV)(ULONG_PTR)params->EnvironmentHandle, (SQLHDBC)(ULONG_PTR)params->ConnectionHandle, + params->CompletionType ); }
const unixlib_entry_t __wine_unix_call_funcs[] = { odbc_process_attach, - odbc_process_detach, wrap_SQLAllocConnect, wrap_SQLAllocEnv, wrap_SQLAllocHandle, @@ -3918,7 +3551,6 @@ static NTSTATUS wow64_SQLTablesW( void *args ) const unixlib_entry_t __wine_unix_call_wow64_funcs[] = { odbc_process_attach, - odbc_process_detach, wrap_SQLAllocConnect, wrap_SQLAllocEnv, wrap_SQLAllocHandle, @@ -4039,138 +3671,3 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] = C_ASSERT( ARRAYSIZE( __wine_unix_call_wow64_funcs) == unix_funcs_count );
#endif /* _WIN64 */ - -static NTSTATUS load_odbc(void) -{ - const char *s = getenv("LIB_ODBC_DRIVER_MANAGER"); - -#ifdef SONAME_LIBODBC - if (!s || !s[0]) s = SONAME_LIBODBC; -#endif - if (!s || !s[0] || !(libodbc = dlopen( s, RTLD_LAZY | RTLD_GLOBAL ))) - { - ERR_(winediag)("failed to open library %s: %s\n", debugstr_a(s), dlerror()); - return STATUS_DLL_NOT_FOUND; - } - -#define LOAD_FUNC(name) \ - p##name = dlsym( libodbc, #name ); - - LOAD_FUNC(SQLAllocConnect); - LOAD_FUNC(SQLAllocEnv); - LOAD_FUNC(SQLAllocHandle); - LOAD_FUNC(SQLAllocHandleStd); - LOAD_FUNC(SQLAllocStmt); - LOAD_FUNC(SQLBindCol); - LOAD_FUNC(SQLBindParam); - LOAD_FUNC(SQLBindParameter); - LOAD_FUNC(SQLBrowseConnect); - LOAD_FUNC(SQLBrowseConnectW); - LOAD_FUNC(SQLBulkOperations); - LOAD_FUNC(SQLCancel); - LOAD_FUNC(SQLCloseCursor); - LOAD_FUNC(SQLColAttribute); - LOAD_FUNC(SQLColAttributeW); - LOAD_FUNC(SQLColAttributes); - LOAD_FUNC(SQLColAttributesW); - LOAD_FUNC(SQLColumnPrivileges); - LOAD_FUNC(SQLColumnPrivilegesW); - LOAD_FUNC(SQLColumns); - LOAD_FUNC(SQLColumnsW); - LOAD_FUNC(SQLConnect); - LOAD_FUNC(SQLConnectW); - LOAD_FUNC(SQLCopyDesc); - LOAD_FUNC(SQLDataSources); - LOAD_FUNC(SQLDataSourcesW); - LOAD_FUNC(SQLDescribeCol); - LOAD_FUNC(SQLDescribeColW); - LOAD_FUNC(SQLDescribeParam); - LOAD_FUNC(SQLDisconnect); - LOAD_FUNC(SQLDriverConnect); - LOAD_FUNC(SQLDriverConnectW); - LOAD_FUNC(SQLDrivers); - LOAD_FUNC(SQLDriversW); - LOAD_FUNC(SQLEndTran); - LOAD_FUNC(SQLError); - LOAD_FUNC(SQLErrorW); - LOAD_FUNC(SQLExecDirect); - LOAD_FUNC(SQLExecDirectW); - LOAD_FUNC(SQLExecute); - LOAD_FUNC(SQLExtendedFetch); - LOAD_FUNC(SQLFetch); - LOAD_FUNC(SQLFetchScroll); - LOAD_FUNC(SQLForeignKeys); - LOAD_FUNC(SQLForeignKeysW); - LOAD_FUNC(SQLFreeConnect); - LOAD_FUNC(SQLFreeEnv); - LOAD_FUNC(SQLFreeHandle); - LOAD_FUNC(SQLFreeStmt); - LOAD_FUNC(SQLGetConnectAttr); - LOAD_FUNC(SQLGetConnectAttrW); - LOAD_FUNC(SQLGetConnectOption); - LOAD_FUNC(SQLGetConnectOptionW); - LOAD_FUNC(SQLGetCursorName); - LOAD_FUNC(SQLGetCursorNameW); - LOAD_FUNC(SQLGetData); - LOAD_FUNC(SQLGetDescField); - LOAD_FUNC(SQLGetDescFieldW); - LOAD_FUNC(SQLGetDescRec); - LOAD_FUNC(SQLGetDescRecW); - LOAD_FUNC(SQLGetDiagField); - LOAD_FUNC(SQLGetDiagFieldW); - LOAD_FUNC(SQLGetDiagRec); - LOAD_FUNC(SQLGetDiagRecW); - LOAD_FUNC(SQLGetEnvAttr); - LOAD_FUNC(SQLGetFunctions); - LOAD_FUNC(SQLGetInfo); - LOAD_FUNC(SQLGetInfoW); - LOAD_FUNC(SQLGetStmtAttr); - LOAD_FUNC(SQLGetStmtAttrW); - LOAD_FUNC(SQLGetStmtOption); - LOAD_FUNC(SQLGetTypeInfo); - LOAD_FUNC(SQLGetTypeInfoW); - LOAD_FUNC(SQLMoreResults); - LOAD_FUNC(SQLNativeSql); - LOAD_FUNC(SQLNativeSqlW); - LOAD_FUNC(SQLNumParams); - LOAD_FUNC(SQLNumResultCols); - LOAD_FUNC(SQLParamData); - LOAD_FUNC(SQLParamOptions); - LOAD_FUNC(SQLPrepare); - LOAD_FUNC(SQLPrepareW); - LOAD_FUNC(SQLPrimaryKeys); - LOAD_FUNC(SQLPrimaryKeysW); - LOAD_FUNC(SQLProcedureColumns); - LOAD_FUNC(SQLProcedureColumnsW); - LOAD_FUNC(SQLProcedures); - LOAD_FUNC(SQLProceduresW); - LOAD_FUNC(SQLPutData); - LOAD_FUNC(SQLRowCount); - LOAD_FUNC(SQLSetConnectAttr); - LOAD_FUNC(SQLSetConnectAttrW); - LOAD_FUNC(SQLSetConnectOption); - LOAD_FUNC(SQLSetConnectOptionW); - LOAD_FUNC(SQLSetCursorName); - LOAD_FUNC(SQLSetCursorNameW); - LOAD_FUNC(SQLSetDescField); - LOAD_FUNC(SQLSetDescFieldW); - LOAD_FUNC(SQLSetDescRec); - LOAD_FUNC(SQLSetEnvAttr); - LOAD_FUNC(SQLSetParam); - LOAD_FUNC(SQLSetPos); - LOAD_FUNC(SQLSetScrollOptions); - LOAD_FUNC(SQLSetStmtAttr); - LOAD_FUNC(SQLSetStmtAttrW); - LOAD_FUNC(SQLSetStmtOption); - LOAD_FUNC(SQLSpecialColumns); - LOAD_FUNC(SQLSpecialColumnsW); - LOAD_FUNC(SQLStatistics); - LOAD_FUNC(SQLStatisticsW); - LOAD_FUNC(SQLTablePrivileges); - LOAD_FUNC(SQLTablePrivilegesW); - LOAD_FUNC(SQLTables); - LOAD_FUNC(SQLTablesW); - LOAD_FUNC(SQLTransact); -#undef LOAD_FUNC - return STATUS_SUCCESS; -} diff --git a/dlls/odbc32/unixlib.h b/dlls/odbc32/unixlib.h index 88e76712328..ed5f0129fd2 100644 --- a/dlls/odbc32/unixlib.h +++ b/dlls/odbc32/unixlib.h @@ -34,7 +34,6 @@ enum sql_funcs { process_attach, - process_detach, unix_SQLAllocConnect, unix_SQLAllocEnv, unix_SQLAllocHandle,
From: Hans Leidekker hans@codeweavers.com
--- configure.ac | 1 + dlls/odbc32/tests/Makefile.in | 5 + dlls/odbc32/tests/odbc32.c | 312 ++++++++++++++++++++++++++++++++++ 3 files changed, 318 insertions(+) create mode 100644 dlls/odbc32/tests/Makefile.in create mode 100644 dlls/odbc32/tests/odbc32.c
diff --git a/configure.ac b/configure.ac index 8f313701514..510a1533ef8 100644 --- a/configure.ac +++ b/configure.ac @@ -2978,6 +2978,7 @@ WINE_CONFIG_MAKEFILE(dlls/ntprint) WINE_CONFIG_MAKEFILE(dlls/ntprint/tests) WINE_CONFIG_MAKEFILE(dlls/objsel) WINE_CONFIG_MAKEFILE(dlls/odbc32) +WINE_CONFIG_MAKEFILE(dlls/odbc32/tests) WINE_CONFIG_MAKEFILE(dlls/odbcbcp) WINE_CONFIG_MAKEFILE(dlls/odbccp32) WINE_CONFIG_MAKEFILE(dlls/odbccp32/tests) diff --git a/dlls/odbc32/tests/Makefile.in b/dlls/odbc32/tests/Makefile.in new file mode 100644 index 00000000000..3c5ee4e4f0d --- /dev/null +++ b/dlls/odbc32/tests/Makefile.in @@ -0,0 +1,5 @@ +TESTDLL = odbc32.dll +IMPORTS = odbc32 + +SOURCES = \ + odbc32.c diff --git a/dlls/odbc32/tests/odbc32.c b/dlls/odbc32/tests/odbc32.c new file mode 100644 index 00000000000..a2a5f202caa --- /dev/null +++ b/dlls/odbc32/tests/odbc32.c @@ -0,0 +1,312 @@ +/* + * Copyright 2024 Hans Leidekker for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "sql.h" +#include "sqlext.h" + +#include <wine/test.h> + +static void test_SQLAllocHandle( void ) +{ + SQLHANDLE handle; + SQLHENV env; + SQLHDBC con; + SQLRETURN ret; + + handle = (void *)0xdeadbeef; + ret = SQLAllocHandle( SQL_HANDLE_ENV, SQL_NULL_HANDLE, &handle ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( handle != (void *)0xdeadbeef, "handle not set\n" ); + ret = SQLFreeHandle( SQL_HANDLE_ENV, handle ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ret = SQLFreeHandle( SQL_HANDLE_ENV, 0 ); + ok( ret == SQL_INVALID_HANDLE, "got %d\n", ret ); + + env = (void *)0xdeadbeef; + ret = SQLAllocEnv( &env ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( env != (void *)0xdeadbeef, "env not set\n" ); + + con = (void *)0xdeadbeef; + ret = SQLAllocConnect( env, &con ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( con != (void *)0xdeadbeef, "con not set\n" ); + + ret = SQLFreeConnect( con ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ret = SQLFreeConnect( 0 ); + ok( ret == SQL_INVALID_HANDLE, "got %d\n", ret ); + ret = SQLFreeEnv( env ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ret = SQLFreeEnv( 0 ); + ok( ret == SQL_INVALID_HANDLE, "got %d\n", ret ); +} + +static void diag( SQLHANDLE handle, SQLSMALLINT type ) +{ + SQLINTEGER err; + SQLSMALLINT len; + SQLCHAR state[5], msg[256]; + SQLRETURN ret; + + memset( state, 0, sizeof(state) ); + err = -1; + len = 0; + ret = SQLGetDiagRec( type, handle, 1, state, &err, msg, sizeof(msg), &len ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + trace( "state %s, err %d, msg %s len %d\n", state, err, msg, len ); +} + +static void test_SQLConnect( void ) +{ + SQLHENV env; + SQLHDBC con; + SQLRETURN ret; + SQLINTEGER size, version; + SQLUINTEGER timeout; + SQLSMALLINT len; + char str[32]; + + ret = SQLAllocEnv( &env ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + version = -1; + size = -1; + ret = SQLGetEnvAttr( env, SQL_ATTR_ODBC_VERSION, &version, sizeof(version), &size ); + if (ret == SQL_ERROR) diag( env, SQL_HANDLE_ENV ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( version != -1, "version not set\n" ); + ok( size == -1, "size set\n" ); + trace( "ODBC version %d\n", version ); + + ret = SQLAllocConnect( env, &con ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLConnect( con, (SQLCHAR *)"winetest", 8, NULL, 0, NULL, 0 ); + if (ret == SQL_ERROR) diag( con, SQL_HANDLE_DBC ); + if (ret != SQL_SUCCESS) + { + SQLFreeConnect( con ); + SQLFreeEnv( env ); + skip( "data source winetest not available\n" ); + return; + } + + timeout = 0xdeadbeef; + size = -1; + ret = SQLGetConnectAttr( con, SQL_ATTR_CONNECTION_TIMEOUT, &timeout, sizeof(timeout), &size ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( timeout != 0xdeadbeef, "timeout not set\n" ); + ok( size == -1, "size set\n" ); + + len = -1; + memset( str, 0, sizeof(str) ); + ret = SQLGetInfo( con, SQL_ODBC_VER, str, sizeof(str), &len ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( str[0], "empty string\n" ); + ok( len != -1, "len not set\n" ); + trace( "version %s\n", str ); + + ret = SQLDisconnect( con ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLFreeConnect( con ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLFreeEnv( env ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); +} + +static void test_SQLDataSources( void ) +{ + SQLHENV env; + SQLRETURN ret; + SQLSMALLINT len, len2; + SQLCHAR server[256], desc[256]; + + ret = SQLAllocEnv( &env ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + len = len2 = -1; + memset( server, 0, sizeof(server) ); + memset( desc, 0, sizeof(desc) ); + ret = SQLDataSources( env, SQL_FETCH_FIRST, server, sizeof(server), &len, desc, sizeof(desc), &len2 ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + if (ret == SQL_SUCCESS) + { + ok( len, "unexpected len\n" ); + ok( len2, "unexpected len\n" ); + ok( server[0], "empty string\n" ); + ok( desc[0], "empty string\n" ); + trace( "server %s len %d desc %s len %d\n", server, len, desc, len2 ); + } + + ret = SQLFreeEnv( env ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); +} + +static void test_SQLDrivers( void ) +{ + SQLHENV env; + SQLRETURN ret; + SQLSMALLINT len, len2; + SQLCHAR desc[256], attrs[256]; + + ret = SQLAllocEnv( &env ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + len = len2 = 0; + memset( desc, 0, sizeof(desc) ); + memset( attrs, 0, sizeof(attrs) ); + ret = SQLDrivers( env, SQL_FETCH_FIRST, desc, sizeof(desc), &len, attrs, sizeof(attrs), &len2 ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + if (ret == SQL_SUCCESS) + { + ok( len, "unexpected len\n" ); + ok( len2, "unexpected len\n" ); + ok( desc[0], "empty string\n" ); + ok( attrs[0], "empty string\n" ); + trace( "desc %s len %d attrs %s len %d\n", desc, len, attrs, len2 ); + } + + ret = SQLFreeEnv( env ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); +} + +static void test_SQLExecDirect( void ) +{ + SQLHENV env; + SQLHDBC con; + SQLHSTMT stmt; + SQLRETURN ret; + SQLLEN count, len_id, len_name; + SQLINTEGER id; + SQLCHAR name[32]; + + ret = SQLAllocEnv( &env ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLAllocConnect( env, &con ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLConnect( con, (SQLCHAR *)"winetest", 8, NULL, 0, NULL, 0 ); + if (ret != SQL_SUCCESS) + { + SQLFreeConnect( con ); + SQLFreeEnv( env ); + skip( "data source winetest not available\n" ); + return; + } + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLAllocStmt( con, &stmt ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + SQLExecDirect( stmt, (SQLCHAR *)"DROP TABLE winetest", ARRAYSIZE("DROP TABLE winetest") - 1 ); + ret = SQLExecDirect( stmt, (SQLCHAR *)"CREATE TABLE winetest ( Id int, Name varchar(255) )", + ARRAYSIZE("CREATE TABLE winetest ( Id int, Name varchar(255) )") - 1 ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + if (ret == SQL_ERROR) diag( stmt, SQL_HANDLE_STMT ); + + ret = SQLExecDirect( stmt, (SQLCHAR *)"INSERT INTO winetest VALUES (0, 'John')", + ARRAYSIZE("INSERT INTO winetest VALUES (0, 'John')") - 1 ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + if (ret == SQL_ERROR) diag( stmt, SQL_HANDLE_STMT ); + + ret = SQLExecDirect( stmt, (SQLCHAR *)"SELECT * FROM winetest", ARRAYSIZE("SELECT * FROM winetest") - 1 ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + if (ret == SQL_ERROR) diag( stmt, SQL_HANDLE_STMT ); + + count = 0xdeadbeef; + ret = SQLRowCount( stmt, &count ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( count != 0xdeadbeef, "got %d\n", (int)count ); + + ret = SQLFetch( stmt ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + id = -1; + len_id = 0; + ret = SQLGetData( stmt, 1, SQL_C_SLONG, &id, sizeof(id), &len_id ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( !id, "id not set\n" ); + ok( len_id == sizeof(id), "got %d\n", (int)len_id ); + + ret = SQLFreeStmt( stmt, 0 ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLAllocStmt( con, &stmt ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLExecDirect( stmt, (SQLCHAR *)"SELECT * FROM winetest", ARRAYSIZE("SELECT * FROM winetest") - 1 ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + if (ret == SQL_ERROR) diag( stmt, SQL_HANDLE_STMT ); + + id = -1; + len_id = 0; + ret = SQLBindCol( stmt, 1, SQL_C_SLONG, &id, sizeof(id), &len_id ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + if (ret == SQL_ERROR) diag( stmt, SQL_HANDLE_STMT ); + + memset( name, 0, sizeof(name) ); + len_name = 0; + ret = SQLBindCol( stmt, 2, SQL_C_CHAR, name, sizeof(name), &len_name ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + if (ret == SQL_ERROR) diag( stmt, SQL_HANDLE_STMT ); + + ret = SQLFetch( stmt ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + ok( !id, "id not set\n" ); + ok( len_id == sizeof(id), "got %d\n", (int)len_id ); + ok( !strcmp( (const char *)name, "John" ), "got %s\n", name ); + ok( len_name == sizeof("John") - 1, "got %d\n", (int)len_name ); + + ret = SQLFreeStmt( stmt, SQL_UNBIND ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLAllocStmt( con, &stmt ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLExecDirect( stmt, (SQLCHAR *)"DROP TABLE winetest", ARRAYSIZE("DROP TABLE winetest") - 1 ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLFreeStmt( stmt, SQL_UNBIND ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLDisconnect( con ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLFreeConnect( con ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); + + ret = SQLFreeEnv( env ); + ok( ret == SQL_SUCCESS, "got %d\n", ret ); +} + +START_TEST(odbc32) +{ + test_SQLAllocHandle(); + test_SQLConnect(); + test_SQLDataSources(); + test_SQLDrivers(); + test_SQLExecDirect(); +}
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=145551
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w7u_adm (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w7u_el (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w8 (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w8adm (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w864 (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w1064v1507 (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w1064v1809 (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w1064_tsign (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w10pro64 (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w10pro64_en_AE_u8 (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w11pro64 (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w7pro64 (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w864 (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w1064v1507 (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w1064v1809 (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w1064_2qxl (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w1064_adm (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w1064_tsign (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w10pro64 (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w10pro64_ar (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w10pro64_ja (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w10pro64_zh_CN (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== w11pro64_amd (64 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100
=== debian11 (32 bit report) ===
odbc32: odbc32.c:153: Test failed: got 100 odbc32.c:181: Test failed: got 100
=== debian11 (32 bit ar:MA report) ===
odbc32: odbc32.c:153: Test failed: got 100 odbc32.c:181: Test failed: got 100
=== debian11 (32 bit de report) ===
odbc32: odbc32.c:153: Test failed: got 100 odbc32.c:181: Test failed: got 100
=== debian11 (32 bit fr report) ===
odbc32: odbc32.c:153: Test failed: got 100 odbc32.c:181: Test failed: got 100
=== debian11 (32 bit he:IL report) ===
odbc32: odbc32.c:153: Test failed: got 100 odbc32.c:181: Test failed: got 100
=== debian11 (32 bit hi:IN report) ===
odbc32: odbc32.c:153: Test failed: got 100 odbc32.c:181: Test failed: got 100
=== debian11 (32 bit ja:JP report) ===
odbc32: odbc32.c:153: Test failed: got 100 odbc32.c:181: Test failed: got 100
=== debian11 (32 bit zh:CN report) ===
odbc32: odbc32.c:153: Test failed: got 100 odbc32.c:181: Test failed: got 100
=== debian11 (build log) ===
0120:err:winediag:SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider. 0120:err:winediag:SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider. 0120:err:winediag:SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider. 0120:err:winediag:SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider. 0120:err:winediag:SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider. 0120:err:winediag:SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider. 0120:err:winediag:SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider. 0120:err:winediag:SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider.
=== debian11b (32 bit WoW report) ===
odbc32: odbc32.c:153: Test failed: got 100 odbc32.c:181: Test failed: got 100
=== debian11b (64 bit WoW report) ===
d2d1: d2d1.c:3077: Test failed: Got unexpected colour 0xff00708f at position {240, 80}. d2d1.c:3077: Test failed: Got unexpected colour 0xff007f80 at position {400, 80}. d2d1.c:3077: Test failed: Got unexpected colour 0xff00a659 at position {240, 400}. d2d1.c:3077: Test failed: Got unexpected colour 0xff00d42b at position {400, 400}. d2d1.c:2953: Test failed: Got unexpected colour 0xff4040ff at position {320, 180}. d2d1.c:2953: Test failed: Got unexpected colour 0xff406dd3 at position {380, 180}. d2d1.c:2953: Test failed: Got unexpected colour 0xff4093ad at position {280, 210}. d2d1.c:2953: Test failed: Got unexpected colour 0xff409ca4 at position {320, 210}. d2d1.c:2953: Test failed: Got unexpected colour 0xff40a59b at position {360, 210}. d2d1.c:2953: Test failed: Got unexpected colour 0xff40ae91 at position {400, 210}. d2d1.c:2953: Test failed: Got unexpected colour 0xff45fb40 at position {280, 240}. d2d1.c:2953: Test failed: Got unexpected colour 0xff4ef240 at position {320, 240}. d2d1.c:2953: Test failed: Got unexpected colour 0xff57e940 at position {360, 240}. d2d1.c:2953: Test failed: Got unexpected colour 0xffad9340 at position {240, 270}. d2d1.c:2953: Test failed: Got unexpected colour 0xffb68a40 at position {280, 270}. d2d1.c:2953: Test failed: Got unexpected colour 0xffbf8040 at position {320, 270}. d2d1.c:2953: Test failed: Got unexpected colour 0xffc87740 at position {360, 270}. d2d1.c:2953: Test failed: Got unexpected colour 0xffff4040 at position {280, 300}. d2d1.c:2953: Test failed: Got unexpected colour 0xffff4040 at position {320, 300}. d2d1.c:4124: Test failed: Surface does not match. d2d1.c:4310: Test failed: Figure does not match. d2d1.c:5027: Test failed: Surface does not match.
d3d10core: d3d10core.c:6270: Test failed: Got unexpected color 0x800000ff. d3d10core.c:5209: Test failed: Got unexpected color 0xff0000ff. d3d10core.c:6317: Test failed: Got unexpected color 0x00ff0000. d3d10core.c:6319: Test failed: Got unexpected color 0x00ff0000. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 3.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 1. d3d10core.c:6753: Test failed: Test 3: Got unexpected color 0x800000ff at (0). d3d10core.c:6753: Test failed: Test 3: Got unexpected color 0x800000ff at (1). d3d10core.c:3286: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0), sub-resource 1. d3d10core.c:6753: Test failed: Test 3: Got unexpected color 0x800000ff at (2). d3d10core.c:6753: Test failed: Test 3: Got unexpected color 0x800000ff at (3). d3d10core.c:5219: Test failed: Got unexpected color 0xff0000ff. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:8698: Test failed: Got 0xff0000ff, expected 0xffffffff at (0, 0), sub-resource 0. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+000, 3.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 4. d3d10core.c:8551: Test failed: Layer 0, ref 0.500000: Got 5.00000000e-001, expected 1.00000000e+000 at (100, 100), sub-resource 0. d3d10core.c:8699: Test failed: Got 0xff0000ff, expected 0x7f7f7f7f at (0, 0), sub-resource 0. d3d10core.c:8700: Test failed: Got 0xff0000ff, expected 0x33333333 at (0, 0), sub-resource 0. d3d10core.c:8551: Test failed: Layer 1, ref 0.500000: Got 5.00000000e-001, expected 0.00000000e+000 at (100, 100), sub-resource 0. d3d10core.c:8701: Test failed: Got 0xff0000ff, expected 0xff7f3300 at (0, 0), sub-resource 0. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 6. d3d10core.c:8551: Test failed: Layer 2, ref 0.500000: Got 5.00000000e-001, expected 0.00000000e+000 at (100, 100), sub-resource 0. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 9.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 8. d3d10core.c:8231: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:8551: Test failed: Layer 3, ref 0.500000: Got 5.00000000e-001, expected 0.00000000e+000 at (100, 100), sub-resource 0. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 2.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 9. d3d10core.c:9224: Test failed: Got unexpected color 0x800000ff. d3d10core.c:5234: Test failed: Got unexpected color 0xff0000ff. d3d10core.c:8713: Test failed: Got 0xff0000ff, expected 0x7f7f7f7f at (0, 0), sub-resource 0. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 3.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 13. d3d10core.c:5236: Test failed: Got unexpected color 0xff0000ff. d3d10core.c:6753: Test failed: Test 6: Got unexpected color 0x800000ff at (0). d3d10core.c:6753: Test failed: Test 6: Got unexpected color 0x800000ff at (1). d3d10core.c:6753: Test failed: Test 6: Got unexpected color 0x800000ff at (2). d3d10core.c:6753: Test failed: Test 6: Got unexpected color 0x800000ff at (3). d3d10core.c:8714: Test failed: Got 0xff0000ff, expected 0x33333333 at (0, 0), sub-resource 0. d3d10core.c:8551: Test failed: Layer 4, ref 0.500000: Got 5.00000000e-001, expected 1.00000000e+000 at (100, 100), sub-resource 0. d3d10core.c:5238: Test failed: Got unexpected color 0xff0000ff. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.00000000e+000, 1.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 15. d3d10core.c:8715: Test failed: Got 0xff0000ff, expected 0xff7f3300 at (0, 0), sub-resource 0. d3d10core.c:6753: Test failed: Test 7: Got unexpected color 0x800000ff at (0). d3d10core.c:6753: Test failed: Test 7: Got unexpected color 0x800000ff at (1). d3d10core.c:6753: Test failed: Test 7: Got unexpected color 0x800000ff at (2). d3d10core.c:5240: Test failed: Got unexpected color 0xff0000ff. d3d10core.c:6753: Test failed: Test 7: Got unexpected color 0x800000ff at (3). d3d10core.c:3286: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:9711: Test failed: Got color 0x800000ff at (0, 0), expected 0xffffffff. d3d10core.c:9711: Test failed: Got color 0x800000ff at (1, 0), expected 0xff000000. d3d10core.c:9711: Test failed: Got color 0x800000ff at (2, 0), expected 0xffffffff. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.00000000e+000, 3.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 16. d3d10core.c:9711: Test failed: Got color 0x800000ff at (3, 0), expected 0xff000000. d3d10core.c:9711: Test failed: Got color 0x800000ff at (0, 1), expected 0xff00ff00. d3d10core.c:9711: Test failed: Got color 0x800000ff at (1, 1), expected 0xff0000ff. d3d10core.c:9711: Test failed: Got color 0x800000ff at (2, 1), expected 0xff00ffff. d3d10core.c:9711: Test failed: Got color 0x800000ff at (3, 1), expected 0x00000000. d3d10core.c:9711: Test failed: Got color 0x800000ff at (0, 2), expected 0xffffff00. d3d10core.c:9711: Test failed: Got color 0x800000ff at (1, 2), expected 0xffff0000. d3d10core.c:9711: Test failed: Got color 0x800000ff at (2, 2), expected 0xffff00ff. d3d10core.c:9711: Test failed: Got color 0x800000ff at (3, 2), expected 0x00000000. d3d10core.c:9711: Test failed: Got color 0x800000ff at (0, 3), expected 0xff000000. d3d10core.c:9711: Test failed: Got color 0x800000ff at (1, 3), expected 0xff7f7f7f. d3d10core.c:9711: Test failed: Got color 0x800000ff at (2, 3), expected 0xffffffff. d3d10core.c:9711: Test failed: Got color 0x800000ff at (3, 3), expected 0x00000000. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 6.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 17. d3d10core.c:9562: Test failed: Got unexpected color 0x800000ff. d3d10core.c:8257: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {6.00000000e+000, 1.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 18. d3d10core.c:9573: Test failed: Got unexpected color 0x800000ff. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {6.00000000e+000, 3.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 19. d3d10core.c:6753: Test failed: Test 8: Got unexpected color 0x800000ff at (0). d3d10core.c:6753: Test failed: Test 8: Got unexpected color 0x800000ff at (1). d3d10core.c:6753: Test failed: Test 8: Got unexpected color 0x800000ff at (2). d3d10core.c:6753: Test failed: Test 8: Got unexpected color 0x800000ff at (3). d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 5.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 20. d3d10core.c:3494: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {7.00000000e+000, 1.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 21. d3d10core.c:7672: Test failed: Test 10: Got unexpected color 0x800000ff at (0, 0). d3d10core.c:9840: Test failed: Got 0x800000ff, expected 0x00000000 at (0, 0), sub-resource 0. d3d10core.c:9575: Test failed: Got unexpected color 0x800000ff. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:8551: Test failed: Layer 3, ref 0.000000: Got 5.00000000e-001, expected 0.00000000e+000 at (100, 100), sub-resource 0. d3d10core.c:6753: Test failed: Test 9: Got unexpected color 0x800000ff at (0). d3d10core.c:6753: Test failed: Test 9: Got unexpected color 0x800000ff at (1). d3d10core.c:6753: Test failed: Test 9: Got unexpected color 0x800000ff at (2). d3d10core.c:6753: Test failed: Test 9: Got unexpected color 0x800000ff at (3). d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (0, 0), expected 0xffffffff. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (1, 0), expected 0xff000000. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (2, 0), expected 0xffffffff. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (3, 0), expected 0xff000000. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (0, 1), expected 0xff00ff00. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (1, 1), expected 0xff0000ff. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (2, 1), expected 0xff00ffff. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (3, 1), expected 0x00000000. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (0, 2), expected 0xffffff00. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (1, 2), expected 0xffff0000. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (2, 2), expected 0xffff00ff. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (3, 2), expected 0x00000000. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (0, 3), expected 0xff000000. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (1, 3), expected 0xff7f7f7f. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (2, 3), expected 0xffffffff. d3d10core.c:9867: Test failed: Got unexpected color 0x800000ff at (3, 3), expected 0x00000000. d3d10core.c:6753: Test failed: Test 10: Got unexpected color 0x800000ff at (0). d3d10core.c:6753: Test failed: Test 10: Got unexpected color 0x800000ff at (1). d3d10core.c:6753: Test failed: Test 10: Got unexpected color 0x800000ff at (2). d3d10core.c:6753: Test failed: Test 10: Got unexpected color 0x800000ff at (3). d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (0, 0), expected 0xff0000ff. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (1, 0), expected 0xff00ffff. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (2, 0), expected 0xff00ff00. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (3, 0), expected 0xffffff00. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (0, 1), expected 0xffff0000. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (1, 1), expected 0xffff00ff. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (2, 1), expected 0xff000000. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (3, 1), expected 0xff7f7f7f. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (0, 2), expected 0xffffffff. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (1, 2), expected 0xffffffff. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (2, 2), expected 0xffffffff. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (3, 2), expected 0xff000000. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (0, 3), expected 0xffffffff. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (1, 3), expected 0xff000000. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (2, 3), expected 0xff000000. d3d10core.c:10095: Test failed: Got unexpected color 0x800000ff at (3, 3), expected 0xff000000. d3d10core.c:9587: Test failed: Got unexpected color 0x800000ff. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (0, 0), expected 0xff0000ff. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (1, 0), expected 0xff00ffff. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (2, 0), expected 0xff00ff00. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (3, 0), expected 0xffffff00. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (0, 1), expected 0xffff0000. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (1, 1), expected 0xffff00ff. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (2, 1), expected 0xff000000. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (3, 1), expected 0xff7f7f7f. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (0, 2), expected 0xffffffff. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (1, 2), expected 0xffffffff. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (2, 2), expected 0xffffffff. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (3, 2), expected 0xff000000. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (0, 3), expected 0xffffffff. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (1, 3), expected 0xff000000. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (2, 3), expected 0xff000000. d3d10core.c:9883: Test failed: Got unexpected color 0x800000ff at (3, 3), expected 0xff000000. d3d10core.c:8296: Test failed: Got 0.00000000e+000, expected 1.00000000e+002 at (0, 0), sub-resource 0. d3d10core.c:6841: Test failed: Test 0: Got unexpected color 0x800000ff at (0). d3d10core.c:6841: Test failed: Test 0: Got unexpected color 0x800000ff at (1). d3d10core.c:6841: Test failed: Test 0: Got unexpected color 0x800000ff at (2). d3d10core.c:6841: Test failed: Test 0: Got unexpected color 0x800000ff at (3). d3d10core.c:10817: Test failed: Got unexpected color 0xffffffff for index 0. d3d10core.c:10149: Test failed: Got 0x800000ff, expected 0x00000000 at (0, 0), sub-resource 0. d3d10core.c:10155: Test failed: Got 0x800000ff, expected 0x00000000 at (0, 0), sub-resource 0. d3d10core.c:8301: Test failed: Got 0.00000000e+000, expected 2.55000000e+002 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {6.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:10933: Test failed: Got 0xffffffff, expected 0xffff0000 at (0, 0), sub-resource 0. d3d10core.c:10817: Test failed: Got unexpected color 0xffffffff for index 1. d3d10core.c:8551: Test failed: Layer 1, ref 1.000000: Got 5.00000000e-001, expected 0.00000000e+000 at (100, 100), sub-resource 0. d3d10core.c:8310: Test failed: Got 0.00000000e+000, expected 3.29999995e+000 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {7.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:10933: Test failed: Got 0xffffffff, expected 0xff0f0f0f at (0, 0), sub-resource 0. d3d10core.c:8551: Test failed: Layer 2, ref 1.000000: Got 5.00000000e-001, expected 1.00000000e+000 at (100, 100), sub-resource 0. d3d10core.c:8315: Test failed: Got 0.00000000e+000, expected 4.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:10817: Test failed: Got unexpected color 0xffffffff for index 3. d3d10core.c:10817: Test failed: Got unexpected color 0xffffffff for index 4. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {9.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:11252: Test failed: Got unexpected color 0x00000000. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:11254: Test failed: Got unexpected color 0x00000000. d3d10core.c:10817: Test failed: Got unexpected color 0xffffffff for index 5. d3d10core.c:11856: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:11607: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:10817: Test failed: Got unexpected color 0xffffffff for index 6. d3d10core.c:11857: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:10817: Test failed: Got unexpected color 0xffffffff for index 7. d3d10core.c:11608: Test failed: Got 5.00000000e-001, expected 4.00000006e-001 at (0, 0), sub-resource 0. d3d10core.c:12079: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {1.00000000e+001, 8.00000000e+000, 7.00000000e+000, 3.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:10817: Test failed: Got unexpected color 0xffffffff for index 8. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:8231: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:12079: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {3.00000000e+000, 5.00000000e+000, 1.00000000e+000, 2.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:12469: Test failed: Got 0xffffffff, expected 0xff007f00 at (0, 0), sub-resource 0. d3d10core.c:12264: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:11706: Test failed: Got 1.00000000e+000, expected 6.99999988e-001 at (0, 0), sub-resource 0. d3d10core.c:11710: Test failed: Got 1.00000000e+000, expected 5.00000000e-001 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:3286: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0), sub-resource 3. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:8249: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:13070: Test failed: Got 0x00000000, expected 0xffff0000 at (0, 0), sub-resource 0. d3d10core.c:8262: Test failed: Got 0.00000000e+000, expected 2.00000003e-001 at (0, 0), sub-resource 0. d3d10core.c:13584: Test failed: Got 0xff0000ff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {6.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:13225: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0xffc00000, 0x7f800000, 0xff800000, 0x3f800000} at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {7.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {8.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:13714: Test failed: Got 0xcc0000ff, expected 0xe2007fcc at (0, 0), sub-resource 0. d3d10core.c:8231: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {9.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:13718: Test failed: Got 0x8000ff00, expected 0xe2007fcc at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:3286: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:13725: Test failed: Got 0xcc0000ff, expected 0x7f00ff00 at (0, 0), sub-resource 0. d3d10core.c:8249: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.10000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:13729: Test failed: Got 0x8000ff00, expected 0xcc0000ff at (0, 0), sub-resource 0. d3d10core.c:12177: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (0, 0), expected 0.00000000e+000. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (1, 0), expected 6.25000000e-002. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (2, 0), expected 1.25000000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (3, 0), expected 1.87500000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (0, 1), expected 2.50000000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (1, 1), expected 3.12500000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (2, 1), expected 3.75000000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (3, 1), expected 4.37500000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (0, 2), expected 5.00000000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (1, 2), expected 5.62500000e-001. d3d10core.c:8257: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (2, 2), expected 6.25000000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (3, 2), expected 6.87500000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (0, 3), expected 7.50000000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (1, 3), expected 8.12500000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (2, 3), expected 8.75000000e-001. d3d10core.c:11734: Test failed: Got unexpected depth 1.00000000e+000 at (3, 3), expected 9.37500000e-001. d3d10core.c:13748: Test failed: Got 0xcc0000ff, expected 0x7f00ff00 at (0, 0), sub-resource 0. d3d10core.c:12172: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:13339: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0f0f0f0f, 0xf0f0f0f0, 0xf0f0f0f0, 0x0f0f0f0f} at (0, 0), sub-resource 0. d3d10core.c:14182: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:8262: Test failed: Got 0.00000000e+000, expected 2.00000003e-001 at (0, 0), sub-resource 0. d3d10core.c:13622: Test failed: Got 0xff0000ff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.40000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:14278: Test failed: Got 0xff00ff00, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:8296: Test failed: Got 0.00000000e+000, expected 1.00000000e+002 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.50000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:12172: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:14358: Test failed: Got 0x00000000, expected 0xffffffff at (0, 0), sub-resource 0. d3d10core.c:8301: Test failed: Got 0.00000000e+000, expected 2.55000000e+002 at (0, 0), sub-resource 0. d3d10core.c:12177: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:15300: Test failed: Got unexpected color 0xff0000ff. d3d10core.c:13617: Test failed: Got 0xff0000ff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:14363: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.60000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xff0000ff at (0, 0). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xff00ffff at (1, 0). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xff00ff00 at (2, 0). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xffffff00 at (3, 0). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xffff0000 at (0, 1). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xffff00ff at (1, 1). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xff000000 at (2, 1). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xff7f7f7f at (3, 1). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xffffffff at (0, 2). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xffffffff at (1, 2). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xffffffff at (2, 2). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xff000000 at (3, 2). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xffffffff at (0, 3). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xff000000 at (1, 3). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xff000000 at (2, 3). d3d10core.c:15093: Test failed: Test 0: Got 0x800000ff, expected 0xff000000 at (3, 3). d3d10core.c:8310: Test failed: Got 0.00000000e+000, expected 3.29999995e+000 at (0, 0), sub-resource 0. d3d10core.c:3286: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0), sub-resource 2. d3d10core.c:13622: Test failed: Got 0xff00ff00, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:14368: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:7965: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.70000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d10core.c:14517: Test failed: Got 0x00000000, expected 0xff0000ff at (400, 0), sub-resource 0. d3d10core.c:8315: Test failed: Got 0.00000000e+000, expected 4.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:14373: Test failed: Got 0x00000000, expected 0xffff0000 at (0, 0), sub-resource 0. d3d10core.c:14513: Test failed: Got 0x00000000, expected 0xffffff00 at (0, 0), sub-resource 0. d3d10core.c:14378: Test failed: Got 0x00000000, expected 0xffffffff at (0, 0), sub-resource 0. d3d10core.c:12177: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:15787: Test failed: Got 0xffffffff, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:13622: Test failed: Got 0xff00ff00, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:14517: Test failed: Got 0x00000000, expected 0xff0000ff at (400, 0), sub-resource 0. d3d10core.c:13617: Test failed: Got 0xff00ff00, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:3286: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0), sub-resource 1. d3d10core.c:8231: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:13643: Test failed: Got 0xffff0000, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:13648: Test failed: Got 0xff00ff00, expected 0xffff0000 at (0, 0), sub-resource 0. d3d10core.c:16952: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:17673: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 200), sub-resource 0. d3d10core.c:17676: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 480), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:16690: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:15800: Test failed: Got 0xffffffff, expected 0xff0000ff at (0, 0), sub-resource 0. d3d10core.c:17849: Test failed: Got 0xffffffff, expected 0x00000000 at (0, 0), sub-resource 0. d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000de at (0, 0). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000de at (1, 0). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000ad at (2, 0). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000ad at (3, 0). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000de at (0, 1). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000de at (1, 1). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000ad at (2, 1). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000ad at (3, 1). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000ba at (0, 2). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000ba at (1, 2). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000be at (2, 2). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000be at (3, 2). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000ba at (0, 3). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000ba at (1, 3). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000be at (2, 3). d3d10core.c:15093: Test failed: Test 6: Got 0x800000ff, expected 0xff0000be at (3, 3). d3d10core.c:13664: Test failed: Got 0xff00ff00, expected 0xffff0000 at (0, 0), sub-resource 0. d3d10core.c:17849: Test failed: Got 0xffffffff, expected 0x00000000 at (0, 0), sub-resource 0. d3d10core.c:17670: Test failed: Got 0xffffffff, expected 0x8000ff00 at (0, 0), sub-resource 0. d3d10core.c:17673: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 200), sub-resource 0. d3d10core.c:17676: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 480), sub-resource 0. d3d10core.c:8249: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (0, 0). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (1, 0). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (2, 0). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (3, 0). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (0, 1). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (1, 1). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (2, 1). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (3, 1). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (0, 2). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (1, 2). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (2, 2). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (3, 2). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (0, 3). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (1, 3). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (2, 3). d3d10core.c:15093: Test failed: Test 7: Got 0x800000ff, expected 0x00000000 at (3, 3). d3d10core.c:13670: Test failed: Got 0xffff0000, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:8257: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d10core.c:17697: Test failed: Got 0xffffffff, expected 0xffff0000 at (0, 0), sub-resource 0. d3d10core.c:17700: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 200), sub-resource 0. d3d10core.c:17703: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 480), sub-resource 0. d3d10core.c:8262: Test failed: Got 0.00000000e+000, expected 2.00000003e-001 at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:15809: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:16725: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:18367: Test failed: Got 0x00000000, expected 0xbfbfbfbf at (0, 0), sub-resource 0. d3d10core.c:16690: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:16697: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xff80ff80 at (0, 0), sub-resource 0. d3d10core.c:17750: Test failed: Got 0xffffffff, expected 0xbfff0000 at (0, 0), sub-resource 0. d3d10core.c:18022: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+000, 1.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (16, 0), sub-resource 0. d3d10core.c:4831: Test failed: Got unexpected query result 0x0000000000000000. d3d10core.c:17750: Test failed: Got 0xffffffff, expected 0x8000ff00 at (0, 0), sub-resource 0. d3d10core.c:18410: Test failed: Got 1.00000000e+000, expected 5.00000000e-001 at (0, 0), sub-resource 0. d3d10core.c:18031: Test failed: Got {5.00000000e-001, 5.00000000e-001, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 2.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:18412: Test failed: Got 1.00000000e+000, expected 5.00000000e-001 at (0, 0), sub-resource 0. d3d10core.c:16725: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xffbcffbc at (0, 0), sub-resource 0. d3d10core.c:18927: Test failed: Got unexpected color 0xffff00b2. d3d10core.c:18065: Test failed: Got {5.00000000e-001, 5.00000000e-001, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 4.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:18432: Test failed: Got 1.00000000e+000, expected 6.00000024e-001 at (0, 0), sub-resource 0. d3d10core.c:18557: Test failed: Got 0x00, expected 0xff at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:18434: Test failed: Got 1.00000000e+000, expected 5.00000000e-001 at (0, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xffdfc0a0 at (0, 0), sub-resource 0. d3d10core.c:18436: Test failed: Got 1.00000000e+000, expected 4.00000006e-001 at (0, 0), sub-resource 0. d3d10core.c:19161: Test failed: Got unexpected colour 0x00000000 at (0, 0, 0), expected 0xff000000. d3d10core.c:19013: Test failed: Got 0xffffffff, expected 0xff000000 at (0, 0), sub-resource 0. d3d10core.c:18081: Test failed: Got {5.00000000e-001, 5.00000000e-001, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 5.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:18563: Test failed: Got 0x00000000, expected 0xff7f4000 at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:18745: Test failed: 0: Got unexpected color 0xff0000ff. d3d10core.c:18086: Test failed: Got {5.00000000e-001, 5.00000000e-001, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+000, 5.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (16, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xfff1e1cf at (0, 0), sub-resource 0. d3d10core.c:18745: Test failed: 1: Got unexpected color 0xff0000ff. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:18557: Test failed: Got 0x00, expected 0xff at (0, 0), sub-resource 0. d3d10core.c:18745: Test failed: 2: Got unexpected color 0xff0000ff. d3d10core.c:17189: Test failed: Got unexpected color 0xffffffff. d3d10core.c:18745: Test failed: 3: Got unexpected color 0xff0000ff. d3d10core.c:18745: Test failed: 4: Got unexpected color 0xff0000ff. d3d10core.c:18855: Test failed: 0: Got unexpected color 0xff0000ff. d3d10core.c:18745: Test failed: 5: Got unexpected color 0xff0000ff. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xffbcffbc at (0, 0), sub-resource 0. d3d10core.c:18855: Test failed: 1: Got unexpected color 0xff0000ff. d3d10core.c:18745: Test failed: 6: Got unexpected color 0xff0000ff. d3d10core.c:19406: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0x2: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {-1.72477726e-034, 5.69045661e-028, -1.07374176e+008, -6.25985340e+018} at (0, 0), sub-resource 0. d3d10core.c:18855: Test failed: 2: Got unexpected color 0xff0000ff. d3d10core.c:19659: Test failed: Got colour {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}. d3d10core.c:18855: Test failed: 3: Got unexpected color 0xff0000ff. d3d10core.c:19704: Test failed: Got unexpected colour 0xff0000ff. d3d10core.c:19591: Test failed: Format 0x6: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {-1.72477726e-034, 5.69045661e-028, -1.07374176e+008, 1.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:18855: Test failed: 4: Got unexpected color 0xff0000ff. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xfff1e1cf at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:18855: Test failed: 5: Got unexpected color 0xff0000ff. d3d10core.c:19591: Test failed: Format 0x10: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {-1.72477726e-034, 5.69045661e-028, 0.00000000e+000, 1.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:18855: Test failed: 6: Got unexpected color 0xff0000ff. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xfff1e1cf at (0, 0), sub-resource 0. d3d10core.c:18855: Test failed: 7: Got unexpected color 0xff0000ff. d3d10core.c:17187: Test failed: Got unexpected color 0xffffffff. d3d10core.c:19591: Test failed: Format 0x29: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {-1.72477726e-034, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xff80ff80 at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0x18: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {7.82991230e-001, 3.28445762e-001, 1.15347020e-001, 6.66666687e-001} at (0, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xff80ff80 at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0x1a: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.89453125e-001, 1.30000000e+001, 3.81250000e+000, 1.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xffdfc0a0 at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0xa: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.56445313e+000, -1.12831593e-004, 1.03500000e+002, 7.57217407e-004} at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0xb: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.62226284e-001, 5.28892934e-001, 3.37773710e-001, 7.11070448e-002} at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xffdfc0a0 at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0xd: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.24460614e-001, -9.42258954e-001, 6.75557733e-001, 1.42216250e-001} at (0, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xff80ff80 at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0x22: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.56445313e+000, -1.12831593e-004, 0.00000000e+000, 1.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0x23: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.62226284e-001, 5.28892934e-001, 0.00000000e+000, 1.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0x25: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.24460614e-001, -9.42258954e-001, 0.00000000e+000, 1.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:17189: Test failed: Got unexpected color 0xffffffff. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xffbcffbc at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0x36: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.56445313e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xfff1e1cf at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0x1c: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.29411772e-001, 2.62745112e-001, 3.96078438e-001, 5.29411793e-001} at (0, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xff80ff80 at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0x1f: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.59842515e-001, 5.27559042e-001, 7.95275569e-001, -9.52755928e-001} at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0x31: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.29411772e-001, 2.62745112e-001, 0.00000000e+000, 1.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:18299: Test failed: Got 0xffffffff, expected 0xfff0dec4 at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:19591: Test failed: Format 0x3d: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.29411772e-001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (0, 0), sub-resource 0. d3d10core.c:17187: Test failed: Got unexpected color 0xffffffff. d3d10core.c:19591: Test failed: Format 0x57: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.96078438e-001, 2.62745112e-001, 1.29411772e-001, 5.29411793e-001} at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:7672: Test failed: Test 70: Got unexpected color 0x800000ff at (3, 3). d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:17187: Test failed: Got unexpected color 0xffffffff. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:17189: Test failed: Got unexpected color 0xffffffff. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:17181: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0. d3d10core.c:17187: Test failed: Got unexpected color 0xffffffff. d3d10core.c:17216: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0), sub-resource 0.
d3d11: d3d11.c:9101: Test failed: Test 1: Got unexpected colour 0x800000ff at (0). d3d11.c:9101: Test failed: Test 1: Got unexpected colour 0x800000ff at (1). d3d11.c:9101: Test failed: Test 1: Got unexpected colour 0x800000ff at (2). d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:9101: Test failed: Test 1: Got unexpected colour 0x800000ff at (3). d3d11.c:11299: Test failed: Got 0xff0000ff, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:9101: Test failed: Test 2: Got unexpected colour 0x800000ff at (0). d3d11.c:9101: Test failed: Test 2: Got unexpected colour 0x800000ff at (1). d3d11.c:9101: Test failed: Test 2: Got unexpected colour 0x800000ff at (2). d3d11.c:9101: Test failed: Test 2: Got unexpected colour 0x800000ff at (3). d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10746: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:11093: Test failed: Got 5.00000000e-001, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:9101: Test failed: Test 3: Got unexpected colour 0x800000ff at (0). d3d11.c:9101: Test failed: Test 3: Got unexpected colour 0x800000ff at (1). d3d11.c:9101: Test failed: Test 3: Got unexpected colour 0x800000ff at (2). d3d11.c:9101: Test failed: Test 3: Got unexpected colour 0x800000ff at (3). d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:11093: Test failed: Got 5.00000000e-001, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:11313: Test failed: Got 0xff0000ff, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:11947: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:11314: Test failed: Got 0xff0000ff, expected 0x7f7f7f7f at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:11315: Test failed: Got 0xff0000ff, expected 0x33333333 at (0, 0, 0), sub-resource 0. d3d11.c:11316: Test failed: Got 0xff0000ff, expected 0xff7f3300 at (0, 0, 0), sub-resource 0. d3d11.c:11951: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 1. d3d11.c:11953: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:13453: Test failed: Got unexpected colour 0x800000ff. d3d11.c:13455: Test failed: Got unexpected colour 0x800000ff. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:9101: Test failed: Test 7: Got unexpected colour 0x800000ff at (0). d3d11.c:9101: Test failed: Test 7: Got unexpected colour 0x800000ff at (1). d3d11.c:9101: Test failed: Test 7: Got unexpected colour 0x800000ff at (2). d3d11.c:9101: Test failed: Test 7: Got unexpected colour 0x800000ff at (3). d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10764: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10772: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:9101: Test failed: Test 8: Got unexpected colour 0x800000ff at (0). d3d11.c:9101: Test failed: Test 8: Got unexpected colour 0x800000ff at (1). d3d11.c:9101: Test failed: Test 8: Got unexpected colour 0x800000ff at (2). d3d11.c:9101: Test failed: Test 8: Got unexpected colour 0x800000ff at (3). d3d11.c:10777: Test failed: Got 0.00000000e+000, expected 2.00000003e-001 at (0, 0), sub-resource 0. d3d11.c:11978: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:11980: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:9101: Test failed: Test 9: Got unexpected colour 0x800000ff at (0). d3d11.c:9101: Test failed: Test 9: Got unexpected colour 0x800000ff at (1). d3d11.c:9101: Test failed: Test 9: Got unexpected colour 0x800000ff at (2). d3d11.c:9101: Test failed: Test 9: Got unexpected colour 0x800000ff at (3). d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 3.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 1. d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 1.10000000e+001, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 2. d3d11.c:11093: Test failed: Got 5.00000000e-001, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:11982: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 3. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 1. d3d11.c:10810: Test failed: Got 0.00000000e+000, expected 1.00000000e+002 at (0, 0), sub-resource 0. d3d11.c:14000: Test failed: Got unexpected colour 0x800000ff. d3d11.c:11984: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:14002: Test failed: Got unexpected colour 0x800000ff. d3d11.c:9101: Test failed: Test 10: Got unexpected colour 0x800000ff at (0). d3d11.c:9101: Test failed: Test 10: Got unexpected colour 0x800000ff at (1). d3d11.c:9101: Test failed: Test 10: Got unexpected colour 0x800000ff at (2). d3d11.c:9101: Test failed: Test 10: Got unexpected colour 0x800000ff at (3). d3d11.c:10815: Test failed: Got 0.00000000e+000, expected 2.55000000e+002 at (0, 0), sub-resource 0. d3d11.c:14013: Test failed: Got unexpected colour 0x800000ff. d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 9.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 8. d3d11.c:10824: Test failed: Got 0.00000000e+000, expected 3.29999995e+000 at (0, 0), sub-resource 0. d3d11.c:14015: Test failed: Got unexpected colour 0x800000ff. d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 2.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 9. d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 3.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 10. d3d11.c:11093: Test failed: Got 5.00000000e-001, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10829: Test failed: Got 0.00000000e+000, expected 4.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:9189: Test failed: Test 0: Got unexpected colour 0x800000ff at (0). d3d11.c:9189: Test failed: Test 0: Got unexpected colour 0x800000ff at (1). d3d11.c:9189: Test failed: Test 0: Got unexpected colour 0x800000ff at (2). d3d11.c:9189: Test failed: Test 0: Got unexpected colour 0x800000ff at (3). d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 8.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 11. d3d11.c:14017: Test failed: Got unexpected colour 0x800000ff. d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 1.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 12. d3d11.c:14019: Test failed: Got unexpected colour 0x800000ff. d3d11.c:14340: Test failed: Got 0x800000ff, expected 0x00000000 at (0, 0, 0), sub-resource 0. d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 3.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 13. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {8.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:11093: Test failed: Got 5.00000000e-001, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:14027: Test failed: Got unexpected colour 0x800000ff. d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 7.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 14. d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 15: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:14367: Test failed: Got colour 0x800000ff at (1, 0), expected 0xff000000. d3d11.c:14686: Test failed: Got colour 0x800000ff at (2, 0), expected 0xff000000. d3d11.c:14367: Test failed: Got colour 0x800000ff at (3, 0), expected 0xff000000. d3d11.c:14686: Test failed: Got colour 0x800000ff at (0, 1), expected 0xffffff00. d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.00000000e+000, 1.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 15. d3d11.c:14367: Test failed: Got colour 0x800000ff at (1, 1), expected 0xff0000ff. d3d11.c:14367: Test failed: Got colour 0x800000ff at (2, 1), expected 0xff00ffff. d3d11.c:14367: Test failed: Got colour 0x800000ff at (3, 1), expected 0x00000000. d3d11.c:14686: Test failed: Got colour 0x800000ff at (0, 2), expected 0xff7f7f7f. d3d11.c:14367: Test failed: Got colour 0x800000ff at (1, 2), expected 0xffff0000. d3d11.c:14367: Test failed: Got colour 0x800000ff at (2, 2), expected 0xffff00ff. d3d11.c:14686: Test failed: Got colour 0x800000ff at (3, 2), expected 0xff7f7f7f. d3d11.c:14686: Test failed: Got colour 0x800000ff at (0, 3), expected 0xffffffff. d3d11.c:14686: Test failed: Got colour 0x800000ff at (1, 3), expected 0xffffffff. d3d11.c:14686: Test failed: Got colour 0x800000ff at (2, 3), expected 0xff000000. d3d11.c:14367: Test failed: Got colour 0x800000ff at (3, 3), expected 0x00000000. d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.00000000e+000, 3.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 16. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {9.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 6.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 17. d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {6.00000000e+000, 1.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 18. d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 16: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {6.00000000e+000, 3.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 19. d3d11.c:11093: Test failed: Got 5.00000000e-001, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10746: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:11864: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 5.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 20. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:14725: Test failed: Got 0x800000ff, expected 0x45454545 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.10000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10764: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10772: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:14800: Test failed: Got 0x800000ff, expected 0x00000000 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10777: Test failed: Got 0.00000000e+000, expected 2.00000003e-001 at (0, 0), sub-resource 0. d3d11.c:15095: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:14812: Test failed: Got colour 0x800000ff at (0, 0), expected 0xff0000ff. d3d11.c:14812: Test failed: Got colour 0x800000ff at (1, 0), expected 0xff00ffff. d3d11.c:14812: Test failed: Got colour 0x800000ff at (2, 0), expected 0xff00ff00. d3d11.c:14812: Test failed: Got colour 0x800000ff at (3, 0), expected 0xffffff00. d3d11.c:14812: Test failed: Got colour 0x800000ff at (0, 1), expected 0xffff0000. d3d11.c:14812: Test failed: Got colour 0x800000ff at (1, 1), expected 0xffff00ff. d3d11.c:14812: Test failed: Got colour 0x800000ff at (2, 1), expected 0xff000000. d3d11.c:14812: Test failed: Got colour 0x800000ff at (3, 1), expected 0xff7f7f7f. d3d11.c:14812: Test failed: Got colour 0x800000ff at (0, 2), expected 0xffffffff. d3d11.c:14812: Test failed: Got colour 0x800000ff at (1, 2), expected 0xffffffff. d3d11.c:14812: Test failed: Got colour 0x800000ff at (2, 2), expected 0xffffffff. d3d11.c:14812: Test failed: Got colour 0x800000ff at (3, 2), expected 0xff000000. d3d11.c:14812: Test failed: Got colour 0x800000ff at (0, 3), expected 0xffffffff. d3d11.c:14812: Test failed: Got colour 0x800000ff at (1, 3), expected 0xff000000. d3d11.c:14812: Test failed: Got colour 0x800000ff at (2, 3), expected 0xff000000. d3d11.c:14812: Test failed: Got colour 0x800000ff at (3, 3), expected 0xff000000. d3d11.c:15097: Test failed: Got 0x00000000, expected 0xffff00ff at (0, 0, 0), sub-resource 0. d3d11.c:15099: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:15107: Test failed: Got colour 0x00000000 at (0, 0), expected 0xff0000ff. d3d11.c:15107: Test failed: Got colour 0x00000000 at (1, 0), expected 0xff00ffff. d3d11.c:15107: Test failed: Got colour 0x00000000 at (2, 0), expected 0xff00ff00. d3d11.c:15107: Test failed: Got colour 0x00000000 at (3, 0), expected 0xffffff00. d3d11.c:15107: Test failed: Got colour 0x00000000 at (0, 1), expected 0xffff0000. d3d11.c:15107: Test failed: Got colour 0x00000000 at (1, 1), expected 0xffff00ff. d3d11.c:15107: Test failed: Got colour 0x00000000 at (2, 1), expected 0xff000000. d3d11.c:15107: Test failed: Got colour 0x00000000 at (3, 1), expected 0xff7f7f7f. d3d11.c:15107: Test failed: Got colour 0x00000000 at (0, 2), expected 0xffffffff. d3d11.c:15107: Test failed: Got colour 0x00000000 at (1, 2), expected 0xffffffff. d3d11.c:15107: Test failed: Got colour 0x00000000 at (2, 2), expected 0xffffffff. d3d11.c:15107: Test failed: Got colour 0x00000000 at (3, 2), expected 0xff000000. d3d11.c:15107: Test failed: Got colour 0x00000000 at (0, 3), expected 0xffffffff. d3d11.c:15107: Test failed: Got colour 0x00000000 at (1, 3), expected 0xff000000. d3d11.c:15107: Test failed: Got colour 0x00000000 at (2, 3), expected 0xff000000. d3d11.c:15107: Test failed: Got colour 0x00000000 at (3, 3), expected 0xff000000. d3d11.c:11151: Test failed: Got 5.00000000e-001, expected 1.00000000e+000 at (100, 100), sub-resource 0. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 2. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:15803: Test failed: Got 0x00000000, expected 0xff7f4c33 at (0, 0, 0), sub-resource 0. d3d11.c:10764: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {6.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10772: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {7.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:11151: Test failed: Got 5.00000000e-001, expected 0.00000000e+000 at (100, 100), sub-resource 0. d3d11.c:15816: Test failed: Got 0x00000000, expected 0xffbc957c at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {8.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:11151: Test failed: Got 5.00000000e-001, expected 0.00000000e+000 at (100, 100), sub-resource 0. d3d11.c:10777: Test failed: Got 0.00000000e+000, expected 2.00000003e-001 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {9.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:16025: Test failed: Got unexpected colour 0x00000000. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:17136: Test failed: Got 1.00000000e+000, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.10000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:17043: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:11151: Test failed: Got 5.00000000e-001, expected 1.00000000e+000 at (100, 100), sub-resource 0. d3d11.c:16039: Test failed: Got unexpected colour 0x00000000. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 3. d3d11.c:10810: Test failed: Got 0.00000000e+000, expected 1.00000000e+002 at (0, 0), sub-resource 0. d3d11.c:11151: Test failed: Got 5.00000000e-001, expected 0.00000000e+000 at (100, 100), sub-resource 0. d3d11.c:16041: Test failed: Got unexpected colour 0x00000000. d3d11.c:17044: Test failed: Got 5.00000000e-001, expected 4.00000006e-001 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.20000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:11151: Test failed: Got 5.00000000e-001, expected 1.00000000e+000 at (100, 100), sub-resource 0. d3d11.c:10815: Test failed: Got 0.00000000e+000, expected 2.55000000e+002 at (0, 0), sub-resource 0. d3d11.c:17144: Test failed: Got 1.00000000e+000, expected 6.99999988e-001 at (0, 0), sub-resource 0. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.30000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10824: Test failed: Got 0.00000000e+000, expected 3.29999995e+000 at (0, 0), sub-resource 0. d3d11.c:11151: Test failed: Got 5.00000000e-001, expected 1.00000000e+000 at (100, 100), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.40000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18160: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {1.00000000e+001, 8.00000000e+000, 7.00000000e+000, 3.00000000e+000} at (0, 0), sub-resource 0. d3d11.c:17524: Test failed: Got 0xffffffff, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10829: Test failed: Got 0.00000000e+000, expected 4.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:17406: Test failed: Got 0xffffffff, expected 0x0000ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.50000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18160: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {3.00000000e+000, 5.00000000e+000, 1.00000000e+000, 2.00000000e+000} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.60000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:17406: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:17406: Test failed: Got 0xffffffff, expected 0x00ffff00 at (0, 0, 0), sub-resource 0. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:17524: Test failed: Got 0xffffffff, expected 0xffff0000 at (0, 0, 0), sub-resource 0. d3d11.c:18465: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.70000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18356: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10746: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:17406: Test failed: Got 0xffffffff, expected 0xffffff00 at (0, 0, 0), sub-resource 0. d3d11.c:17524: Test failed: Got 0xffffffff, expected 0xff0f0f0f at (0, 0, 0), sub-resource 0. d3d11.c:17406: Test failed: Got 0xffffffff, expected 0x000000ff at (0, 0, 0), sub-resource 0. d3d11.c:18820: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000bbbb, 0x0000cccc, 0x0000dddd} at (0, 0), sub-resource 0. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18255: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:18828: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000bbbb, 0x0000cccc, 0x0000dddd} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18832: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000c0de, 0x0000ffff, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (0, 0), expected 0.00000000e+000. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (1, 0), expected 6.25000000e-002. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (2, 0), expected 1.25000000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (3, 0), expected 1.87500000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (0, 1), expected 2.50000000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (1, 1), expected 3.12500000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (2, 1), expected 3.75000000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (3, 1), expected 4.37500000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (0, 2), expected 5.00000000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (1, 2), expected 5.62500000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (2, 2), expected 6.25000000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (3, 2), expected 6.87500000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (0, 3), expected 7.50000000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (1, 3), expected 8.12500000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (2, 3), expected 8.75000000e-001. d3d11.c:17172: Test failed: Got unexpected depth 1.00000000e+000 at (3, 3), expected 9.37500000e-001. d3d11.c:19632: Test failed: Got 0x00000000, expected 0xffff0000 at (0, 0, 0), sub-resource 0. d3d11.c:10772: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10777: Test failed: Got 0.00000000e+000, expected 2.00000003e-001 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 2. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {6.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {7.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18820: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000c0de, 0x0000ffff, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:20209: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0xffc00000, 0x7f800000, 0xff800000, 0x3f800000} at (0, 0), sub-resource 0. d3d11.c:18260: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:20931: Test failed: Got 0xff0000ff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {8.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:21064: Test failed: Got 0xcc0000ff, expected 0xe2007fcc at (0, 0, 0), sub-resource 0. d3d11.c:20939: Test failed: Got 0xff00ff00, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {9.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18828: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000c0de, 0x0000ffff, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:21068: Test failed: Got 0x8000ff00, expected 0xe2007fcc at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000001, 0x00000001, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:18255: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:21075: Test failed: Got 0xcc0000ff, expected 0x7f00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 1. d3d11.c:6086: Test failed: Got unexpected query result 0x0000000000000000. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff} at (0, 0), sub-resource 0. d3d11.c:18255: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x80000000, 0x80000000, 0x80000000, 0x80000000} at (0, 0), sub-resource 0. d3d11.c:21098: Test failed: Got 0xcc0000ff, expected 0x7f00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x80000000, 0x80000000, 0x80000000, 0x80000000} at (0, 0), sub-resource 0. d3d11.c:18260: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff} at (0, 0), sub-resource 0. d3d11.c:18828: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000c0de, 0x0000ffff, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:21102: Test failed: Got 0x8000ff00, expected 0xcc0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18832: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000bbbb, 0x0000cccc, 0x0000dddd} at (0, 0), sub-resource 0. d3d11.c:20964: Test failed: Got 0xff00ff00, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20969: Test failed: Got 0xff0000ff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18836: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000c0de, 0x0000ffff, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:11519: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 3. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00ff00ff, 0x00ff00ff, 0x00ff00ff, 0x00ff00ff} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {6.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18820: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000bbbb, 0x0000ffff, 0x0000dddd} at (0, 0), sub-resource 0. d3d11.c:20969: Test failed: Got 0xff00ff00, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {7.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18824: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000c0de, 0x0000cccc, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:20964: Test failed: Got 0xff0000ff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {8.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20969: Test failed: Got 0xff00ff00, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000001, 0x00000001, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {9.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18832: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000c0de, 0x0000cccc, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:18836: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000bbbb, 0x0000ffff, 0x0000dddd} at (0, 0), sub-resource 0. d3d11.c:20964: Test failed: Got 0xff00ff00, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000001, 0x00000001, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000002, 0x00000002, 0x00000002, 0x00000002} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.10000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18816: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000c0de, 0x0000ffff, 0x0000dddd} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.20000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18820: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000bbbb, 0x0000cccc, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.30000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20990: Test failed: Got 0xffff0000, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.40000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000001, 0x00000001, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:21399: Test failed: Feature level 0x9300: Got 0x00000000, expected 0x7f0000ff at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000002, 0x00000002, 0x00000002, 0x00000002} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.50000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:21399: Test failed: Feature level 0x9200: Got 0x00000000, expected 0x7f0000ff at (0, 0, 0), sub-resource 0. d3d11.c:21011: Test failed: Got 0xff00ff00, expected 0xffff0000 at (0, 0, 0), sub-resource 0. d3d11.c:21410: Test failed: Feature level 0x9300: Got 0x00000000, expected 0xffffff00 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.60000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x80000000, 0x80000000, 0x80000000, 0x80000000} at (0, 0), sub-resource 0. d3d11.c:21017: Test failed: Got 0xffff0000, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.70000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.80000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18828: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000bbbb, 0x0000cccc, 0x0000dddd} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.90000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:21654: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21656: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21658: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21660: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21662: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:18832: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000c0de, 0x0000ffff, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:21783: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.00000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:21671: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21673: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21675: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21677: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21679: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21873: Test failed: Got 0xffffffff, expected 0x00000000 at (0, 0, 0), sub-resource 0. d3d11.c:21964: Test failed: Got 0xff00ff00, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.10000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:21654: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21656: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21658: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21660: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21662: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21410: Test failed: Feature level 0x9100: Got 0x00000000, expected 0xffffff00 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.20000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18820: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000c0de, 0x0000cccc, 0x0000dddd} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.30000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:21671: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21673: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21675: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21677: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:21679: Test failed: Got unexpected colour 0xff0000ff. d3d11.c:18824: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000bbbb, 0x0000ffff, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0xfffffffa, 0xfffffffa, 0xfffffffa, 0xfffffffa} at (0, 0), sub-resource 0. d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0x3f000000 at (0, 0). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0x3e800000 at (1, 0). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0x00000000 at (3, 0). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0xbf800000 at (0, 1). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0xc0000000 at (1, 1). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0xc0400000 at (2, 1). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0xc0800000 at (3, 1). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0xbf000000 at (0, 2). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0xbe800000 at (1, 2). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0xbf800000 at (2, 2). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0x80000000 at (3, 2). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0x40000000 at (1, 3). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0x40400000 at (2, 3). d3d11.c:22335: Test failed: Test 0: Got 0x3f800000, expected 0x40800000 at (3, 3). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x00000000 at (0, 0). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x00000010 at (1, 0). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x00000020 at (2, 0). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x00000030 at (3, 0). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x00000040 at (0, 1). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x00000050 at (1, 1). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x00000060 at (2, 1). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x00000070 at (3, 1). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x00000080 at (0, 2). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x00000090 at (1, 2). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x000000a0 at (2, 2). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x000000b0 at (3, 2). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x000000c0 at (0, 3). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x000000d0 at (1, 3). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x000000e0 at (2, 3). d3d11.c:22335: Test failed: Test 1: Got 0x3f800000, expected 0x000000f0 at (3, 3). d3d11.c:18828: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000c0de, 0x0000cccc, 0x0000dddd} at (0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0xfffffffc, 0xfffffffc, 0xfffffffc, 0xfffffffc} at (0, 0), sub-resource 0. d3d11.c:18832: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000bbbb, 0x0000ffff, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:23331: Test failed: Got 0x00000000, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:23225: Test failed: Test 0: Got 0xffff (65535), expected 0x1 (1) for 'atomic_and' with inputs (1, 0), (-1), 0xffff (65535). d3d11.c:23225: Test failed: Test 0: Got 0 (0), expected 0x1 (1) for 'atomic_cmp_store' with inputs (1, 0), (-1), 0 (0). d3d11.c:23225: Test failed: Test 0: Got 0x1 (1), expected 0x2 (2) for 'atomic_iadd' with inputs (1, 0), (-1), 0x1 (1). d3d11.c:23225: Test failed: Test 0: Got 0 (0), expected 0x1 (1) for 'atomic_or' with inputs (1, 0), (-1), 0 (0). d3d11.c:23225: Test failed: Test 0: Got 0 (0), expected 0x1 (1) for 'atomic_umax' with inputs (1, 0), (-1), 0 (0). d3d11.c:23225: Test failed: Test 0: Got 0xff (255), expected 0xfe (254) for 'atomic_xor' with inputs (1, 0), (-1), 0xff (255). d3d11.c:23336: Test failed: Got 0x00000000, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:22995: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000064, 0x00000064, 0x00000064, 0x00000064} at (0, 0), sub-resource 0. d3d11.c:23225: Test failed: Test 1: Got 0x1 (1), expected 0 (0) for 'atomic_iadd' with inputs (4294967295, 4294967295), (0), 0x1 (1). d3d11.c:23225: Test failed: Test 1: Got 0 (0), expected 0xffffffff (-1) for 'atomic_or' with inputs (4294967295, 4294967295), (0), 0 (0). d3d11.c:23225: Test failed: Test 1: Got 0 (0), expected 0xffffffff (-1) for 'atomic_umax' with inputs (4294967295, 4294967295), (0), 0 (0). d3d11.c:23225: Test failed: Test 1: Got 0xffffffff (-1), expected 0 (0) for 'atomic_xor' with inputs (4294967295, 4294967295), (0), 0xffffffff (-1). d3d11.c:18816: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000c0de, 0x0000cccc, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:23341: Test failed: Got 0x00000000, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000001, 0x00000001, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {4.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:23001: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:23346: Test failed: Got 0x00000000, expected 0xffff0000 at (0, 0, 0), sub-resource 0. d3d11.c:23351: Test failed: Got 0x00000000, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000100, 0x00000100, 0x00000100, 0x00000100} at (0, 0), sub-resource 0. d3d11.c:23488: Test failed: Got 0x00000000, expected 0xffffff00 at (0, 0, 0), sub-resource 0. d3d11.c:23006: Test failed: Got 0.00000000e+000, expected 2.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {5.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18824: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000c0de, 0x0000cccc, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:23014: Test failed: Got 0.00000000e+000, expected 2.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:23492: Test failed: Got 0x00000000, expected 0xff0000ff at (400, 0, 0), sub-resource 0. d3d11.c:18828: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000bbbb, 0x0000ffff, 0x0000dddd} at (0, 0), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000010, 0x00000010, 0x00000010, 0x00000010} at (0, 0), sub-resource 0. d3d11.c:18832: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000c0de, 0x0000cccc, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {6.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:23017: Test failed: Got 0.00000000e+000, expected 4.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {7.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 72: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:18816: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000dead, 0x0000c0de, 0x0000ffff, 0x0000dddd} at (0, 0), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000002, 0x00000014, 0x00000000, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:24909: Test failed: Feature level 0xa000: Got 0x00000000, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {8.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:24909: Test failed: Feature level 0xb000: Got 0x00000000, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:18820: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000bbbb, 0x0000cccc, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff0000ff at (0, 0). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff0000ff at (1, 0). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff00ffff at (2, 0). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff00ffff at (3, 0). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff0000ff at (0, 1). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff0000ff at (1, 1). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff00ffff at (2, 1). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff00ffff at (3, 1). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff00ff00 at (0, 2). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff00ff00 at (1, 2). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xffffff00 at (2, 2). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xffffff00 at (3, 2). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff00ff00 at (0, 3). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xff00ff00 at (1, 3). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xffffff00 at (2, 3). d3d11.c:24753: Test failed: Test 2: Got 0x800000ff, expected 0xffffff00 at (3, 3). d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {9.00000000e+000, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000002, 0x00000020, 0x00000000, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:24915: Test failed: Feature level 0xb000: Got 0x00000000, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:24921: Test failed: Feature level 0xa100: Got 0x00000000, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000005, 0x00000004, 0x00000000, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (0, 0). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (1, 0). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (2, 0). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (3, 0). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (0, 1). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (1, 1). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (2, 1). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (3, 1). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (0, 2). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (1, 2). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (2, 2). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (3, 2). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (0, 3). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (1, 3). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (2, 3). d3d11.c:24753: Test failed: Test 3: Got 0x800000ff, expected 0xff0000ff at (3, 3). d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.10000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:18828: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000aaaa, 0x0000bbbb, 0x0000cccc, 0x0000eeee} at (0, 0), sub-resource 0. d3d11.c:24927: Test failed: Feature level 0xa100: Got 0x00000000, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.20000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000002, 0x00000004, 0x00000000, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.30000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.40000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000002, 0x00000004, 0x00000000, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.50000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 78: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000032, 0x00000032, 0x00000032, 0x00000032} at (0, 0), sub-resource 0. d3d11.c:26400: Test failed: Got 0x00000000, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 79: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.60000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:26426: Test failed: Got 0xff00ff00, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000001, 0x00000001, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.70000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00007fff, 0x00007fff, 0x00007fff, 0x00007fff} at (0, 0), sub-resource 0. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {4.00000000e+000, 5.00000000e+000, 1.00000000e+000, 0.00000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {5.00000000e+000, 6.00000000e+000, 2.00000000e+000, 1.00000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {6.00000000e+000, 7.00000000e+000, 3.00000000e+000, 2.00000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {7.00000000e+000, 7.00000000e+000, 3.00000000e+000, 3.00000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {8.00000000e+000, 9.00000000e+000, 5.00000000e+000, 4.00000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {9.00000000e+000, 5.00000000e-001, 6.00000000e+000, 5.00000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {5.00000000e-001, 1.50000000e+000, 7.00000000e+000, 6.00000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {1.50000000e+000, 1.50000000e+000, 7.00000000e+000, 7.00000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {2.50000000e+000, 3.50000000e+000, 9.00000000e+000, 8.00000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {3.50000000e+000, 4.50000000e+000, 5.00000000e-001, 9.00000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {4.50000000e+000, 5.50000000e+000, 1.50000000e+000, 5.00000000e-001}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {5.50000000e+000, 5.50000000e+000, 1.50000000e+000, 1.50000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {2.50000000e+000, 3.50000000e+000, 3.50000000e+000, 2.50000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {3.50000000e+000, 4.50000000e+000, 4.50000000e+000, 3.50000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {4.50000000e+000, 5.50000000e+000, 5.50000000e+000, 4.50000000e+000}. d3d11.c:28047: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {5.50000000e+000, 5.50000000e+000, 5.50000000e+000, 5.50000000e+000}. d3d11.c:27329: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.80000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 83: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {1.90000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:26463: Test failed: Got 0xff00ff00, expected 0xffffffff at (0, 0, 0), sub-resource 0. d3d11.c:28096: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {1.00000001e-001, 1.10000002e+000, 1.00000000e+000, 0.00000000e+000}. d3d11.c:28096: Test failed: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {1.10000002e+000, 2.09999990e+000, 2.00000000e+000, 1.00000000e+000}. d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 84: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:27334: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000032, 0x00000032, 0x00000032, 0x00000032} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.10000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 85: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000001, 0x00000001, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.20000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:27343: Test failed: Got 0xffffffff, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.30000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000032, 0x00000032, 0x00000032, 0x00000032} at (0, 0), sub-resource 0. d3d11.c:27347: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 86: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.40000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:28879: Test failed: Feature level 0xb000: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.50000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:24179: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000002, 0x00000002, 0x00000002, 0x00000002} at (0, 0), sub-resource 0. d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 87: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00007fff, 0x00007fff, 0x00007fff, 0x00007fff} at (0, 0), sub-resource 0. d3d11.c:28888: Test failed: Feature level 0xb000: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 88: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:28985: Test failed: Got 0x00000000, expected 0x00000064 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.70000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:29152: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 89: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:28987: Test failed: Got 0x00000000, expected 0x000000c8 at (0, 0, 0), sub-resource 0. d3d11.c:29153: Test failed: Got 5.00000000e-001, expected 6.99999988e-001 at (0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000000f, 0x007fffff, 0x0000007f, 0x3fffffff} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.80000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000000, 0x007f0000, 0x00000000, 0x3f800000} at (0, 0), sub-resource 0. d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 90: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {2.90000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000000, 0x0000ff00, 0x00000000, 0x007f8000} at (0, 0), sub-resource 0. d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:10081: Test failed: Test 91: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:28995: Test failed: Got 0x00000000, expected 0x0000012c at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000000f, 0x00000000, 0x0000007f, 0x0000007f} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.00000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.10000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:28999: Test failed: Got 0x00000000, expected 0x00000190 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000000, 0x00400000, 0x00000001, 0x20000001} at (0, 0), sub-resource 0. d3d11.c:29153: Test failed: Got 5.00000000e-001, expected 6.99999988e-001 at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.20000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000000f, 0x0000000f, 0x0000000f, 0x0000000f} at (0, 0), sub-resource 0. d3d11.c:29629: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:30794: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:30797: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 200, 1), sub-resource 0. d3d11.c:30800: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 480, 1), sub-resource 0. d3d11.c:30794: Test failed: Got 0xffffffff, expected 0xbfff0000 at (0, 0, 0), sub-resource 0. d3d11.c:30797: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 200, 1), sub-resource 0. d3d11.c:30800: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 480, 1), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x007fffff, 0x007fffff, 0x007fffff, 0x007fffff} at (0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.30000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:30794: Test failed: Got 0xffffffff, expected 0x8000ff00 at (0, 0, 0), sub-resource 0. d3d11.c:30797: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 200, 1), sub-resource 0. d3d11.c:30800: Test succeeded inside todo block: Got 0xffffffff, expected 0xffffffff at (640, 480, 1), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.40000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x3fffffff, 0x3fffffff, 0x3fffffff, 0x3fffffff} at (0, 0), sub-resource 0. d3d11.c:30821: Test failed: Got 0xffffffff, expected 0xffff0000 at (0, 0, 0), sub-resource 0. d3d11.c:10480: Test failed: Got {0.00000000e+000, 0.00000000e+000, 0.00000000e+000, 0.00000000e+000}, expected {3.50000000e+001, 0.00000000e+000, 0.00000000e+000, 1.00000000e+000} at (100, 100), sub-resource 0. d3d11.c:30975: Test failed: Got 0xffffffff, expected 0x00000000 at (0, 0, 0), sub-resource 0. d3d11.c:29153: Test failed: Got 5.00000000e-001, expected 6.00000024e-001 at (0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00007fff, 0x00007fff, 0x00007fff, 0x00007fff} at (0, 0), sub-resource 0. d3d11.c:30975: Test failed: Got 0xffffffff, expected 0x00000000 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00007ffe, 0x00007ffe, 0x00007ffe, 0x00007ffe} at (0, 0), sub-resource 0. d3d11.c:31159: Test failed: Got {5.00000000e-001, 5.00000000e-001, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 2.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 0. d3d11.c:30975: Test failed: Got 0xffffffff, expected 0x00000000 at (0, 0, 0), sub-resource 0. d3d11.c:30874: Test failed: Got 0xffffffff, expected 0xbfff0000 at (0, 0, 0), sub-resource 0. d3d11.c:30975: Test failed: Got 0xffffffff, expected 0x00000000 at (0, 0, 0), sub-resource 0. d3d11.c:30874: Test failed: Got 0xffffffff, expected 0x8000ff00 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff} at (0, 0), sub-resource 0. d3d11.c:29629: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0001ffff, 0x0001ffff, 0x0001ffff, 0x0001ffff} at (0, 0), sub-resource 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xff80ff80 at (0, 0, 0), sub-resource 0. d3d11.c:31805: Test failed: Test 0: Got unexpected value 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xffbcffbc at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000001, 0x00000001, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:31210: Test failed: Got {5.00000000e-001, 5.00000000e-001, 0.00000000e+000, 0.00000000e+000}, expected {0.00000000e+000, 5.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (0, 0), sub-resource 0. d3d11.c:31824: Test failed: Test 0: Got unexpected value 0. d3d11.c:31952: Test failed: Got 0x00000000, expected 0x7f7f7f7f at (0, 0, 0), sub-resource 0. d3d11.c:31215: Test failed: Got {5.00000000e-001, 5.00000000e-001, 0.00000000e+000, 0.00000000e+000}, expected {1.00000000e+000, 5.00000000e+000, 0.00000000e+000, 0.00000000e+000} at (16, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000001, 0x00000001, 0x00000001} at (0, 0), sub-resource 0. d3d11.c:31802: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:29641: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:31959: Test failed: Got 0x00000000, expected 0x3f3f3f3f at (0, 0, 0), sub-resource 0. d3d11.c:32004: Test failed: Got 1.00000000e+000, expected 5.00000000e-001 at (0, 0), sub-resource 0. d3d11.c:30312: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:31819: Test failed: Test 1: Got unexpected value 0. d3d11.c:32006: Test failed: Got 1.00000000e+000, expected 5.00000000e-001 at (0, 0), sub-resource 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xffdfc0a0 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x1e6a2c48, 0x12345678, 0x1e6a0000, 0x2c480000} at (0, 0), sub-resource 0. d3d11.c:32026: Test failed: Got 1.00000000e+000, expected 6.00000024e-001 at (0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000ffff, 0xffff0000, 0x00000000, 0xffff0000} at (0, 0), sub-resource 0. d3d11.c:30312: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:31805: Test failed: Test 2: Got unexpected value 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000} at (0, 0), sub-resource 0. d3d11.c:30121: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:30320: Test failed: Got unexpected color 0xffffffff. d3d11.c:32156: Test failed: Got 0x00, expected 0xff at (0, 0, 0), sub-resource 0. d3d11.c:31805: Test failed: Test 3: Got unexpected value 0. d3d11.c:32030: Test failed: Got 1.00000000e+000, expected 4.00000006e-001 at (0, 0), sub-resource 0. d3d11.c:31824: Test failed: Test 3: Got unexpected value 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000020, 0x00000000, 0x0000001f, 0xffffffff} at (0, 0), sub-resource 0. d3d11.c:32274: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:32162: Test failed: Got 0x00000000, expected 0xff7f4000 at (0, 0, 0), sub-resource 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xffbcffbc at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0000001f, 0x00000000, 0x0000001e, 0x0000001e} at (0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000001, 0x0000001f, 0x0000001f, 0x0000001e} at (0, 0), sub-resource 0. d3d11.c:31805: Test failed: Test 4: Got unexpected value 0. d3d11.c:32156: Test failed: Got 0x00, expected 0xff at (0, 0, 0), sub-resource 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xffbcffbc at (0, 0, 0), sub-resource 0. d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (0, 0). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (1, 0). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (2, 0). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (3, 0). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (0, 1). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (1, 1). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (2, 1). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (3, 1). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (0, 2). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (1, 2). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (2, 2). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (3, 2). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (0, 3). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (1, 3). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (2, 3). d3d11.c:32557: Test failed: Got unexpected colour 0x00000000 at (3, 3). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (0, 0). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (1, 0). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (2, 0). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (3, 0). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (0, 1). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (1, 1). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (2, 1). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (3, 1). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (0, 2). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (1, 2). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (2, 2). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (3, 2). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (0, 3). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (1, 3). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (2, 3). d3d11.c:32568: Test failed: Got unexpected colour 0x00000000 at (3, 3). d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000002, 0x00000000, 0x0000001f, 0x0000001e} at (0, 0), sub-resource 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xfff1e1cf at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000008, 0x00000003, 0x0000001f, 0x0000001e} at (0, 0), sub-resource 0. d3d11.c:30312: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xfff1e1cf at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000010, 0x00000002, 0x0000001f, 0x0000001d} at (0, 0), sub-resource 0. d3d11.c:32853: Test failed: 0: Got unexpected colour 0xff0000ff. d3d11.c:32853: Test failed: 1: Got unexpected colour 0xff0000ff. d3d11.c:33091: Test failed: Got unexpected colour 0xffff00b2. d3d11.c:32853: Test failed: 2: Got unexpected colour 0xff0000ff. d3d11.c:31824: Test failed: Test 5: Got unexpected value 0. d3d11.c:30312: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xff80ff80 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000008, 0x00000000, 0x0000001c, 0x0000001c} at (0, 0), sub-resource 0. d3d11.c:32998: Test failed: 0: Got unexpected colour 0xb233801a. d3d11.c:32998: Test failed: 1: Got unexpected colour 0xb233801a. d3d11.c:32998: Test failed: 2: Got unexpected colour 0xb233801a. d3d11.c:32853: Test failed: 6: Got unexpected colour 0xff0000ff. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000004, 0x00000000, 0x00000003, 0x00000003} at (0, 0), sub-resource 0. d3d11.c:32998: Test failed: 3: Got unexpected colour 0xb233801a. d3d11.c:32998: Test failed: 4: Got unexpected colour 0xb233801a. d3d11.c:31805: Test failed: Test 6: Got unexpected value 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000005, 0x00000000, 0x0000001f, 0x0000001e} at (0, 0), sub-resource 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xff80ff80 at (0, 0, 0), sub-resource 0. d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (0, 0). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (1, 0). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (2, 0). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (3, 0). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (0, 1). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (1, 1). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (2, 1). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (3, 1). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (0, 2). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (1, 2). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (2, 2). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (3, 2). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (0, 3). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (1, 3). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (2, 3). d3d11.c:32674: Test failed: Got unexpected colour 0x800000ff at (3, 3). d3d11.c:31824: Test failed: Test 6: Got unexpected value 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000013, 0x00000013, 0x00000013} at (0, 0), sub-resource 0. d3d11.c:32871: Test failed: 0: Got unexpected colour 0xff0000ff. d3d11.c:31805: Test failed: Test 7: Got unexpected value 0. d3d11.c:32871: Test failed: 1: Got unexpected colour 0xff0000ff. d3d11.c:30312: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:33016: Test failed: 0: Got unexpected colour 0xb233801a. d3d11.c:32871: Test failed: 2: Got unexpected colour 0xff0000ff. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xffdfc0a0 at (0, 0, 0), sub-resource 0. d3d11.c:33016: Test failed: 1: Got unexpected colour 0xb233801a. d3d11.c:33016: Test failed: 2: Got unexpected colour 0xb233801a. d3d11.c:32871: Test failed: 3: Got unexpected colour 0xff0000ff. d3d11.c:33016: Test failed: 3: Got unexpected colour 0xb233801a. d3d11.c:32871: Test failed: 4: Got unexpected colour 0xff0000ff. d3d11.c:31849: Test failed: Got 0xffffffff, expected 0xff404040 at (0, 0, 0), sub-resource 0. d3d11.c:32871: Test failed: 5: Got unexpected colour 0xff0000ff. d3d11.c:32871: Test failed: 6: Got unexpected colour 0xff0000ff. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xffdfc0a0 at (0, 0, 0), sub-resource 0. d3d11.c:31864: Test failed: Got 0xffffffff, expected 0xff0000ff at (0, 0, 0), sub-resource 0. d3d11.c:32871: Test failed: 7: Got unexpected colour 0xff0000ff. d3d11.c:33016: Test failed: 4: Got unexpected colour 0xb233801a. d3d11.c:33016: Test failed: 6: Got unexpected colour 0xb233801a. d3d11.c:30312: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xff80ff80 at (0, 0, 0), sub-resource 0. d3d11.c:31872: Test failed: Got 0xffffffff, expected 0xffff0000 at (0, 0, 0), sub-resource 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xffdfc0a0 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000000, 0x00000001, 0x00000064, 0x000000fa} at (0, 0), sub-resource 0. d3d11.c:31876: Test failed: Got 0xffffffff, expected 0xff000000 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000000, 0x00000001, 0x00000064, 0x000000fa} at (0, 0), sub-resource 0. d3d11.c:30312: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xffbcffbc at (0, 0, 0), sub-resource 0. d3d11.c:34319: Test failed: Got unexpected colour 0xff000000. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x00000000, 0x00003c00, 0x0000bc00, 0x00006134} at (0, 0), sub-resource 0. d3d11.c:34920: Test failed: Format 0x2: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {-1.72477726e-034, 5.69045661e-028, -1.07374176e+008, -6.25985340e+018}. d3d11.c:33530: Test failed: Got unexpected colour 0xff000000. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xfff1e1cf at (0, 0, 0), sub-resource 0. d3d11.c:33550: Test failed: Got unexpected colour 0xff000000. d3d11.c:34920: Test failed: Format 0x6: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {-1.72477726e-034, 5.69045661e-028, -1.07374176e+008, 1.00000000e+000}. d3d11.c:30318: Test failed: Got unexpected color 0xffffffff. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xff80ff80 at (0, 0, 0), sub-resource 0. d3d11.c:20644: Test failed: Got {0x00000000, 0x00000000, 0x00000000, 0x00000000}, expected {0x0f0f0f0f, 0xf0f0f0f0, 0xf0f0f0f0, 0x0f0f0f0f} at (0, 0), sub-resource 0. d3d11.c:34920: Test failed: Format 0x10: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {-1.72477726e-034, 5.69045661e-028, 0.00000000e+000, 1.00000000e+000}. d3d11.c:31429: Test failed: Got 0xffffffff, expected 0xfff0dec4 at (0, 0, 0), sub-resource 0. d3d11.c:30312: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0. d3d11.c:34920: Test failed: Format 0xa: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {3.56445313e+000, -1.12831593e-004, 1.03500000e+002, 7.57217407e-004}. d3d11.c:34920: Test failed: Format 0x22: Got {1.00000000e+000, 1.00000000e+000, 1.00000000e+000, 1.00000000e+000}, expected {3.56445313e+000, -1.12831593e-004, 0.00000000e+000, 1.00000000e+000}. d3d11.c:30312: Test failed: Got 0xffffffff, expected 0xff00ff00 at (0, 0, 0), sub-resource 0.
odbc32: odbc32.c:153: Test failed: got 100 odbc32.c:181: Test failed: got 100
=== debian11b (build log) ===
0120:err:winediag:SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider. 1088:err:winediag:SQLDrivers No ODBC drivers could be found. Check the settings for your libodbc provider.