From 995b17c2080112500c713a8c7e4441624d5bd699 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 19 Jun 2024 09:33:32 +1000 Subject: [PATCH] Rebase against 96d294aa123497d3c5b0611d9de4787e3eb7fc6a. --- .../0001-odbc32-Remove-unixODBC-support.patch | 1815 +++-------------- ...Multiple-values-when-parsing-the-pro.patch | 102 - patches/oledb32-mode-property/definition | 6 - staging/upstream-commit | 2 +- 4 files changed, 287 insertions(+), 1638 deletions(-) delete mode 100644 patches/oledb32-mode-property/0001-oledb32-Support-Multiple-values-when-parsing-the-pro.patch delete mode 100644 patches/oledb32-mode-property/definition diff --git a/patches/odbc-remove-unixodbc/0001-odbc32-Remove-unixODBC-support.patch b/patches/odbc-remove-unixodbc/0001-odbc32-Remove-unixODBC-support.patch index ea6fddad..7c086062 100644 --- a/patches/odbc-remove-unixodbc/0001-odbc32-Remove-unixODBC-support.patch +++ b/patches/odbc-remove-unixodbc/0001-odbc32-Remove-unixODBC-support.patch @@ -1,4 +1,4 @@ -From c3ec036d558bfe68e9e3f5277e7cf12d2e29181e Mon Sep 17 00:00:00 2001 +From 632ab1b34fa94b82be14e36879cc22f3794a6e17 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 2 Feb 2023 14:20:44 +1100 Subject: [PATCH] odbc32: Remove unixODBC support @@ -6,12 +6,10 @@ Subject: [PATCH] odbc32: Remove unixODBC support --- configure.ac | 10 - dlls/odbc32/Makefile.in | 5 +- - dlls/odbc32/proxyodbc.c | 2051 +++++----------------- + dlls/odbc32/proxyodbc.c | 2073 +++++----------------- dlls/odbc32/unixlib.c | 3673 --------------------------------------- - dlls/odbc32/unixlib.h | 1257 -------------- - 5 files changed, 419 insertions(+), 6577 deletions(-) + 4 files changed, 419 insertions(+), 5342 deletions(-) delete mode 100644 dlls/odbc32/unixlib.c - delete mode 100644 dlls/odbc32/unixlib.h diff --git a/configure.ac b/configure.ac index 4c6578f49e4..915c6d48b38 100644 @@ -51,7 +49,7 @@ index 0ec0ae8eaf4..a42f1473d67 100644 - unixlib.c + rsrc.rc diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c -index 658dda29a6c..89e4545f068 100644 +index d97837e5bca..89e4545f068 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -40,46 +40,19 @@ @@ -83,7 +81,8 @@ index 658dda29a6c..89e4545f068 100644 - struct SQLAllocConnect_params params; - struct handle *con, *env = EnvironmentHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - TRACE("(EnvironmentHandle %p, ConnectionHandle %p)\n", EnvironmentHandle, ConnectionHandle); - - *ConnectionHandle = 0; @@ -96,8 +95,7 @@ index 658dda29a6c..89e4545f068 100644 - *ConnectionHandle = con; - } - else free( con ); -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("Returning %d, ConnectionHandle %p\n", ret, *ConnectionHandle); + FIXME("(EnvironmentHandle %p, ConnectionHandle %p)\n", EnvironmentHandle, ConnectionHandle); + *ConnectionHandle = SQL_NULL_HDBC; @@ -111,14 +109,14 @@ index 658dda29a6c..89e4545f068 100644 - struct SQLAllocEnv_params params; - struct handle *env; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("(EnvironmentHandle %p)\n", EnvironmentHandle); -+ FIXME("(EnvironmentHandle %p)\n", EnvironmentHandle); ++ SQLRETURN ret = SQL_ERROR; - *EnvironmentHandle = 0; - if (!(env = alloc_handle())) return SQL_ERROR; -- ++ FIXME("(EnvironmentHandle %p)\n", EnvironmentHandle); + - if (SUCCESS((ret = ODBC_CALL( SQLAllocEnv, ¶ms )))) - { - env->unix_handle = params.EnvironmentHandle; @@ -166,10 +164,11 @@ index 658dda29a6c..89e4545f068 100644 - struct SQLAllocStmt_params params; - struct handle *stmt, *con = ConnectionHandle; - SQLRETURN ret; -- -- TRACE("(ConnectionHandle %p, StatementHandle %p)\n", ConnectionHandle, StatementHandle); + SQLRETURN ret = SQL_ERROR; +- TRACE("(ConnectionHandle %p, StatementHandle %p)\n", ConnectionHandle, StatementHandle); ++ FIXME("(ConnectionHandle %p, StatementHandle %p)\n", ConnectionHandle, StatementHandle); + - *StatementHandle = 0; - if (!(stmt = alloc_handle())) return SQL_ERROR; - @@ -180,8 +179,7 @@ index 658dda29a6c..89e4545f068 100644 - *StatementHandle = stmt; - } - else free( stmt ); -+ FIXME("(ConnectionHandle %p, StatementHandle %p)\n", ConnectionHandle, StatementHandle); - +- - TRACE ("Returning %d, StatementHandle %p\n", ret, *StatementHandle); + *StatementHandle = SQL_NULL_HSTMT; return ret; @@ -220,7 +218,7 @@ index 658dda29a6c..89e4545f068 100644 } -#define MAX_BINDING_PARAMS 1024 --static BOOL alloc_binding( struct param_binding *binding, UINT column, UINT row_count ) +-static BOOL alloc_binding( struct param_binding *binding, USHORT type, UINT column, UINT row_count ) -{ - if (column > MAX_BINDING_PARAMS) - { @@ -230,6 +228,7 @@ index 658dda29a6c..89e4545f068 100644 - if (!binding->param && !(binding->param = calloc( MAX_BINDING_PARAMS, sizeof(*binding->param)))) return FALSE; - - if (!(binding->param[column - 1].len = calloc( row_count, sizeof(UINT64) ))) return FALSE; +- binding->param[column - 1].type = type; - binding->count = column; - return TRUE; -} @@ -256,10 +255,9 @@ index 658dda29a6c..89e4545f068 100644 - FIXME( "column 0 not handled\n" ); - return SQL_ERROR; - } -- if (!alloc_binding( &handle->bind_col, ColumnNumber, handle->row_count )) return SQL_ERROR; +- if (!alloc_binding( &handle->bind_col, SQL_PARAM_INPUT_OUTPUT, ColumnNumber, handle->row_count )) return SQL_ERROR; - params.StatementHandle = handle->unix_handle; -- params.StrLen_or_Ind = handle->bind_col.param[i].len; -- *(UINT64 *)params.StrLen_or_Ind = *StrLen_or_Ind; +- if (StrLen_or_Ind) 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; @@ -287,7 +285,7 @@ index 658dda29a6c..89e4545f068 100644 - FIXME( "parameter 0 not handled\n" ); - return SQL_ERROR; - } -- if (!alloc_binding( &handle->bind_param, ParameterNumber, handle->row_count )) return SQL_ERROR; +- if (!alloc_binding( &handle->bind_param, SQL_PARAM_INPUT, ParameterNumber, handle->row_count )) return SQL_ERROR; - - params.StatementHandle = handle->unix_handle; - params.StrLen_or_Ind = handle->bind_param.param[i].len; @@ -304,13 +302,13 @@ index 658dda29a6c..89e4545f068 100644 - struct SQLCancel_params params; - struct handle *handle = StatementHandle; - SQLRETURN ret; +- +- TRACE("(StatementHandle %p)\n", StatementHandle); + SQLRETURN ret = SQL_ERROR; -- TRACE("(StatementHandle %p)\n", StatementHandle); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(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); @@ -324,13 +322,13 @@ index 658dda29a6c..89e4545f068 100644 - struct SQLCloseCursor_params params; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p)\n", StatementHandle); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p)\n", StatementHandle); + FIXME("(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); @@ -363,7 +361,7 @@ index 658dda29a6c..89e4545f068 100644 - - params.StatementHandle = handle->unix_handle; - params.NumericAttribute = &num_attr; -- if (SUCCESS(( ret = ODBC_CALL( SQLColAttribute, ¶ms )))) *NumericAttribute = num_attr; +- if (SUCCESS(( ret = ODBC_CALL( SQLColAttribute, ¶ms ))) && NumericAttribute) *NumericAttribute = num_attr; - TRACE("Returning %d\n", ret); return ret; } @@ -425,13 +423,13 @@ index 658dda29a6c..89e4545f068 100644 - struct SQLCopyDesc_params params; - struct handle *source = SourceDescHandle, *target = TargetDescHandle; - SQLRETURN ret; -- -- TRACE("(SourceDescHandle %p, TargetDescHandle %p)\n", SourceDescHandle, TargetDescHandle); + SQLRETURN ret = SQL_ERROR; -- if (!source || !target) return SQL_INVALID_HANDLE; +- TRACE("(SourceDescHandle %p, TargetDescHandle %p)\n", SourceDescHandle, TargetDescHandle); + FIXME("(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 ); @@ -532,13 +530,13 @@ index 658dda29a6c..89e4545f068 100644 - struct SQLDisconnect_params params; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; +- +- TRACE("(ConnectionHandle %p)\n", ConnectionHandle); + SQLRETURN ret = SQL_ERROR; -- TRACE("(ConnectionHandle %p)\n", ConnectionHandle); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(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); @@ -552,13 +550,13 @@ index 658dda29a6c..89e4545f068 100644 - struct SQLEndTran_params params = { HandleType, 0, CompletionType }; - struct handle *handle = Handle; - SQLRETURN ret; -- -- TRACE("(HandleType %d, Handle %p, CompletionType %d)\n", HandleType, Handle, CompletionType); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(HandleType %d, Handle %p, CompletionType %d)\n", HandleType, Handle, CompletionType); + FIXME("(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); @@ -598,7 +596,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -571,18 +337,11 @@ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, S +@@ -571,98 +337,23 @@ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, S */ SQLRETURN WINAPI SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength) { @@ -619,7 +617,68 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -591,75 +350,22 @@ SQLRETURN WINAPI SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, +-static void len_to_user( SQLLEN *ptr, UINT8 *len, UINT row_count, UINT width ) +-{ +- UINT i; +- for (i = 0; i < row_count; i++) +- { +- *ptr++ = *(SQLLEN *)(len + i * width); +- } +-} +- +-static void len_from_user( UINT8 *len, SQLLEN *ptr, UINT row_count, UINT width ) +-{ +- UINT i; +- for (i = 0; i < row_count; i++) +- { +- *(SQLLEN *)(len + i * width) = *ptr++; +- } +-} +- +-static void update_result_lengths( struct handle *handle, USHORT type ) +-{ +- UINT i, width = sizeof(void *) == 8 ? 8 : is_wow64 ? 8 : 4; +- +- switch (type) +- { +- case SQL_PARAM_OUTPUT: +- for (i = 0; i < handle->bind_col.count; i++) +- { +- len_to_user( handle->bind_col.param[i].ptr, handle->bind_col.param[i].len, handle->row_count, width ); +- } +- for (i = 0; i < handle->bind_param.count; i++) +- { +- len_to_user( handle->bind_param.param[i].ptr, handle->bind_param.param[i].len, handle->row_count, width ); +- } +- for (i = 0; i < handle->bind_parameter.count; i++) +- { +- if (handle->bind_parameter.param[i].type != SQL_PARAM_OUTPUT && +- handle->bind_parameter.param[i].type != SQL_PARAM_INPUT_OUTPUT) continue; +- +- len_to_user( handle->bind_parameter.param[i].ptr, handle->bind_parameter.param[i].len, handle->row_count, width ); +- } +- break; +- +- case SQL_PARAM_INPUT: +- for (i = 0; i < handle->bind_col.count; i++) +- { +- len_from_user( handle->bind_col.param[i].len, handle->bind_col.param[i].ptr, handle->row_count, width ); +- } +- /* FIXME: handle bind_param */ +- for (i = 0; i < handle->bind_parameter.count; i++) +- { +- if (handle->bind_parameter.param[i].type != SQL_PARAM_INPUT && +- handle->bind_parameter.param[i].type != SQL_PARAM_INPUT_OUTPUT) continue; +- +- len_from_user( handle->bind_parameter.param[i].len, handle->bind_parameter.param[i].ptr, handle->row_count, width ); +- } +- +- default: break; +- } +-} +- + /************************************************************************* + * SQLExecute [ODBC32.012] */ SQLRETURN WINAPI SQLExecute(SQLHSTMT StatementHandle) { @@ -634,52 +693,13 @@ index 658dda29a6c..89e4545f068 100644 + FIXME("(StatementHandle %p)\n", StatementHandle); - params.StatementHandle = handle->unix_handle; -- ret = ODBC_CALL( SQLExecute, ¶ms ); +- update_result_lengths( handle, SQL_PARAM_INPUT ); +- if (SUCCESS(( ret = ODBC_CALL( SQLExecute, ¶ms )))) update_result_lengths( handle, SQL_PARAM_OUTPUT ); - TRACE("Returning %d\n", ret); return ret; } --static void update_result_lengths( struct handle *handle ) --{ -- UINT i, j, width = sizeof(void *) == 8 ? 8 : is_wow64 ? 8 : 4; -- -- for (i = 0; i < handle->bind_col.count; i++) -- { -- SQLLEN *ptr = handle->bind_col.param[i].ptr; -- if (ptr) -- { -- for (j = 0; j < handle->row_count; j++) -- { -- *ptr++ = *(SQLLEN *)(handle->bind_col.param[i].len + j * width); -- } -- } -- } -- for (i = 0; i < handle->bind_param.count; i++) -- { -- SQLLEN *ptr = handle->bind_param.param[i].ptr; -- if (ptr) -- { -- for (j = 0; j < handle->row_count; j++) -- { -- *ptr++ = *(SQLLEN *)(handle->bind_param.param[i].len + j * width); -- } -- } -- } -- for (i = 0; i < handle->bind_parameter.count; i++) -- { -- SQLLEN *ptr = handle->bind_parameter.param[i].ptr; -- if (ptr) -- { -- for (j = 0; j < handle->row_count; j++) -- { -- *ptr++ = *(SQLLEN *)(handle->bind_parameter.param[i].len + j * width); -- } -- } -- } --} -- - /************************************************************************* - * SQLFetch [ODBC32.013] +@@ -671,17 +362,10 @@ SQLRETURN WINAPI SQLExecute(SQLHSTMT StatementHandle) */ SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle) { @@ -694,12 +714,12 @@ index 658dda29a6c..89e4545f068 100644 - if (!handle) return SQL_INVALID_HANDLE; - - params.StatementHandle = handle->unix_handle; -- if (SUCCESS(( ret = ODBC_CALL( SQLFetch, ¶ms )))) update_result_lengths( handle ); +- if (SUCCESS(( ret = ODBC_CALL( SQLFetch, ¶ms )))) update_result_lengths( handle, SQL_PARAM_OUTPUT ); - TRACE("Returning %d\n", ret); return ret; } -@@ -668,18 +374,11 @@ SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle) +@@ -690,18 +374,11 @@ SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle) */ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLLEN FetchOffset) { @@ -715,12 +735,12 @@ index 658dda29a6c..89e4545f068 100644 - if (!handle) return SQL_INVALID_HANDLE; - - params.StatementHandle = handle->unix_handle; -- if (SUCCESS(( ret = ODBC_CALL( SQLFetchScroll, ¶ms )))) update_result_lengths( handle ); +- if (SUCCESS(( ret = ODBC_CALL( SQLFetchScroll, ¶ms )))) update_result_lengths( handle, SQL_PARAM_OUTPUT ); - TRACE("Returning %d\n", ret); return ret; } -@@ -688,18 +387,10 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien +@@ -710,18 +387,10 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien */ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) { @@ -741,7 +761,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -708,59 +399,22 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) +@@ -730,59 +399,22 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) */ SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle) { @@ -805,7 +825,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -769,20 +423,10 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) +@@ -791,20 +423,10 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) */ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) { @@ -828,7 +848,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -792,18 +436,11 @@ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) +@@ -814,18 +436,11 @@ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -849,7 +869,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -812,17 +449,10 @@ SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut +@@ -834,17 +449,10 @@ SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut */ SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value) { @@ -869,7 +889,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -832,18 +462,11 @@ SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti +@@ -854,18 +462,11 @@ SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength) { @@ -890,7 +910,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -853,20 +476,11 @@ SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, +@@ -875,20 +476,11 @@ SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType, SQLPOINTER TargetValue, SQLLEN BufferLength, SQLLEN *StrLen_or_Ind) { @@ -913,7 +933,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -876,18 +490,11 @@ SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, +@@ -898,18 +490,11 @@ SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLRETURN WINAPI SQLGetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -934,7 +954,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -899,22 +506,12 @@ SQLRETURN WINAPI SQLGetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, +@@ -921,22 +506,12 @@ SQLRETURN WINAPI SQLGetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision, SQLSMALLINT *Scale, SQLSMALLINT *Nullable) { @@ -959,7 +979,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -925,19 +522,11 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM +@@ -947,19 +522,11 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -981,7 +1001,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -945,23 +534,15 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM +@@ -967,23 +534,15 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM * SQLGetDiagRec [ODBC32.036] */ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, @@ -1009,7 +1029,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -971,18 +552,11 @@ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMAL +@@ -993,18 +552,11 @@ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMAL SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -1030,7 +1050,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -991,17 +565,10 @@ SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, +@@ -1013,17 +565,10 @@ SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported) { @@ -1050,7 +1070,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1011,18 +578,11 @@ SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT Function +@@ -1033,18 +578,11 @@ SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT Function SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -1071,7 +1091,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1032,11 +592,9 @@ SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQL +@@ -1054,11 +592,9 @@ SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQL SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -1085,7 +1105,7 @@ index 658dda29a6c..89e4545f068 100644 Attribute, Value, BufferLength, StringLength); if (!Value) -@@ -1045,11 +603,6 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -1067,11 +603,6 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, return SQL_ERROR; } @@ -1097,7 +1117,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1058,17 +611,10 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -1080,17 +611,10 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLPOINTER Value) { @@ -1117,7 +1137,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1077,17 +623,10 @@ SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, +@@ -1099,17 +623,10 @@ SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, */ SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType) { @@ -1137,7 +1157,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1096,17 +635,10 @@ SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType) +@@ -1118,17 +635,10 @@ SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType) */ SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount) { @@ -1157,7 +1177,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1115,17 +647,10 @@ SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnC +@@ -1137,17 +647,10 @@ SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnC */ SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value) { @@ -1177,7 +1197,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1134,18 +659,11 @@ SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value) +@@ -1156,18 +659,11 @@ SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value) */ SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength) { @@ -1198,7 +1218,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1154,17 +672,10 @@ SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQ +@@ -1176,17 +672,10 @@ SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQ */ SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN StrLen_or_Ind) { @@ -1218,7 +1238,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1173,23 +684,10 @@ SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN St +@@ -1195,23 +684,10 @@ SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN St */ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount) { @@ -1244,7 +1264,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1199,18 +697,11 @@ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount) +@@ -1221,18 +697,11 @@ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount) SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -1265,7 +1285,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1219,17 +710,10 @@ SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut +@@ -1241,17 +710,10 @@ SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut */ SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value) { @@ -1285,7 +1305,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1238,18 +722,11 @@ SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti +@@ -1260,18 +722,11 @@ SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti */ SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT NameLength) { @@ -1306,7 +1326,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1259,18 +736,11 @@ SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, +@@ -1281,18 +736,11 @@ SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLRETURN WINAPI SQLSetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength) { @@ -1327,7 +1347,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1281,26 +751,12 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, +@@ -1303,26 +751,12 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT SubType, SQLLEN Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLLEN *StringLength, SQLLEN *Indicator) { @@ -1356,7 +1376,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1310,16 +766,11 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, +@@ -1332,16 +766,11 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLRETURN WINAPI SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -1375,7 +1395,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1330,76 +781,26 @@ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNum +@@ -1352,76 +781,26 @@ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNum SQLSMALLINT ParameterType, SQLULEN LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLLEN *StrLen_or_Ind) { @@ -1456,27 +1476,27 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1408,17 +809,10 @@ SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -1430,17 +809,10 @@ SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLSetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLULEN 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)); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, Option %d, Value %s)\n", StatementHandle, Option, debugstr_sqlulen(Value)); + FIXME("(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; } -@@ -1430,22 +824,14 @@ SQLRETURN WINAPI SQLSpecialColumns(SQLHSTMT StatementHandle, SQLUSMALLINT Identi +@@ -1452,22 +824,14 @@ SQLRETURN WINAPI SQLSpecialColumns(SQLHSTMT StatementHandle, SQLUSMALLINT Identi SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SQLUSMALLINT Nullable) { @@ -1501,7 +1521,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1456,22 +842,14 @@ SQLRETURN WINAPI SQLStatistics(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, S +@@ -1478,22 +842,14 @@ SQLRETURN WINAPI SQLStatistics(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, S SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved) { @@ -1526,7 +1546,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1482,23 +860,15 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM +@@ -1504,23 +860,15 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *TableType, SQLSMALLINT NameLength4) { @@ -1552,7 +1572,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -1507,42 +877,27 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM +@@ -1529,42 +877,27 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM */ SQLRETURN WINAPI SQLTransact(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLUSMALLINT CompletionType) { @@ -1587,39 +1607,39 @@ index 658dda29a6c..89e4545f068 100644 - StringLength2 }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - 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); ++ SQLRETURN ret = SQL_ERROR; + +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hdbc %p, szConnStrIn %s, cbConnStrIn %d, szConnStrOut %p, cbConnStrOutMax %d, pcbConnStrOut %p)\n", + hdbc, debugstr_an((const char *)szConnStrIn, cbConnStrIn), cbConnStrIn, szConnStrOut, cbConnStrOutMax, + pcbConnStrOut); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLBrowseConnect, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1551,149 +906,96 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectio +@@ -1573,149 +906,96 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectio */ SQLRETURN WINAPI SQLBulkOperations(SQLHSTMT StatementHandle, SQLSMALLINT Operation) { - struct SQLBulkOperations_params params = { 0, Operation }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p, Operation %d)\n", StatementHandle, Operation); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, Operation %d)\n", StatementHandle, Operation); + FIXME("(StatementHandle %p, Operation %d)\n", StatementHandle, Operation); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; -- if (SUCCESS(( ret = ODBC_CALL( SQLBulkOperations, ¶ms )))) update_result_lengths( handle ); +- if (SUCCESS(( ret = ODBC_CALL( SQLBulkOperations, ¶ms )))) update_result_lengths( handle, SQL_PARAM_OUTPUT ); - TRACE("Returning %d\n", ret); return ret; } @@ -1639,16 +1659,16 @@ index 658dda29a6c..89e4545f068 100644 - struct handle *handle = StatementHandle; - INT64 attrs; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("(StatementHandle %p, ColumnNumber %d, FieldIdentifier %d, CharacterAttributes %p, BufferLength %d, " - "StringLength %p, NumericAttributes %p)\n", StatementHandle, ColumnNumber, FieldIdentifier, - CharacterAttributes, BufferLength, StringLength, NumericAttributes); ++ SQLRETURN ret = SQL_ERROR; + +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hstmt %p, icol %d, fDescType %d, rgbDesc %p, cbDescMax %d, pcbDesc %p, pfDesc %p)\n", hstmt, icol, + fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - params.NumericAttributes = &attrs; - if (SUCCESS((ret = ODBC_CALL( SQLColAttributes, ¶ms )))) *NumericAttributes = attrs; @@ -1670,15 +1690,15 @@ index 658dda29a6c..89e4545f068 100644 - TableName, NameLength3, ColumnName, NameLength4 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - 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); -+ SQLRETURN ret = SQL_ERROR; - +- - if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hstmt %p, szCatalogName %s, cbCatalogName %d, szSchemaName %s, cbSchemaName %d, szTableName %s," + " cbTableName %d, szColumnName %s, cbColumnName %d)\n", hstmt, @@ -1705,15 +1725,15 @@ index 658dda29a6c..89e4545f068 100644 - struct handle *handle = StatementHandle; - UINT64 size; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p, ParameterNumber %d, DataType %p, ParameterSize %p, DecimalDigits %p, Nullable %p)\n", -- StatementHandle, ParameterNumber, DataType, ParameterSize, DecimalDigits, Nullable); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, ParameterNumber %d, DataType %p, ParameterSize %p, DecimalDigits %p, Nullable %p)\n", +- StatementHandle, ParameterNumber, DataType, ParameterSize, DecimalDigits, Nullable); + FIXME("(hstmt %p, ipar %d, pfSqlType %p, pcbParamDef %p, pibScale %p, pfNullable %p)\n", hstmt, ipar, + pfSqlType, pcbParamDef, pibScale, pfNullable); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - params.ParameterSize = &size; - if (SUCCESS((ret = ODBC_CALL( SQLDescribeParam, ¶ms )))) *ParameterSize = size; @@ -1733,15 +1753,15 @@ index 658dda29a6c..89e4545f068 100644 - struct handle *handle = StatementHandle; - UINT64 count; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("(StatementHandle %p, FetchOrientation %d, FetchOffset %s, RowCount %p, RowStatusArray %p)\n", - StatementHandle, FetchOrientation, debugstr_sqllen(FetchOffset), RowCount, RowStatusArray); ++ SQLRETURN ret = SQL_ERROR; + +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hstmt %p, fFetchType %d, irow %s, pcrow %p, rgfRowStatus %p)\n", hstmt, fFetchType, debugstr_sqllen(irow), + pcrow, rgfRowStatus); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - params.RowCount = &count; - if (SUCCESS((ret = ODBC_CALL( SQLExtendedFetch, ¶ms )))) *RowCount = count; @@ -1768,7 +1788,8 @@ index 658dda29a6c..89e4545f068 100644 - FkSchemaName, NameLength5, FkTableName, NameLength6 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - 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, @@ -1778,9 +1799,6 @@ index 658dda29a6c..89e4545f068 100644 - debugstr_an((const char *)FkCatalogName, NameLength4), NameLength4, - debugstr_an((const char *)FkSchemaName, NameLength5), NameLength5, - debugstr_an((const char *)FkTableName, NameLength6), NameLength6); -+ SQLRETURN ret = SQL_ERROR; - -- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(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, @@ -1791,26 +1809,28 @@ index 658dda29a6c..89e4545f068 100644 + debugstr_an((const char *)szFkSchemaName, cbFkSchemaName), cbFkSchemaName, + debugstr_an((const char *)szFkTableName, cbFkTableName), cbFkTableName); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLForeignKeys, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1702,382 +1004,213 @@ SQLRETURN WINAPI SQLForeignKeys(SQLHSTMT StatementHandle, SQLCHAR *PkCatalogName +@@ -1724,382 +1004,213 @@ SQLRETURN WINAPI SQLForeignKeys(SQLHSTMT StatementHandle, SQLCHAR *PkCatalogName */ SQLRETURN WINAPI SQLMoreResults(SQLHSTMT StatementHandle) { - struct SQLMoreResults_params params; - struct handle *handle = StatementHandle; - SQLRETURN ret; +- +- TRACE("(%p)\n", StatementHandle); + SQLRETURN ret = SQL_ERROR; -- TRACE("(%p)\n", StatementHandle); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(%p)\n", StatementHandle); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLMoreResults, ¶ms ); - TRACE("Returning %d\n", ret); @@ -1829,16 +1849,16 @@ index 658dda29a6c..89e4545f068 100644 - TextLength2 }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - 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); -+ SQLRETURN ret = SQL_ERROR; - -- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hdbc %p, szSqlStrIn %s, cbSqlStrIn %d, szSqlStr %p, cbSqlStrMax %d, pcbSqlStr %p)\n", hdbc, + debugstr_an((const char *)szSqlStrIn, cbSqlStrIn), cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLNativeSql, ¶ms ); - TRACE("Returning %d\n", ret); @@ -1854,13 +1874,13 @@ index 658dda29a6c..89e4545f068 100644 - struct SQLNumParams_params params = { 0, ParameterCount }; - struct handle *handle = StatementHandle; - SQLRETURN ret; +- +- TRACE("(StatementHandle %p, pcpar %p)\n", StatementHandle, ParameterCount); + SQLRETURN ret = SQL_ERROR; -- TRACE("(StatementHandle %p, pcpar %p)\n", StatementHandle, ParameterCount); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hstmt %p, pcpar %p)\n", hstmt, pcpar); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLNumParams, ¶ms ); - TRACE("Returning %d\n", ret); @@ -1877,14 +1897,14 @@ index 658dda29a6c..89e4545f068 100644 - struct handle *handle = StatementHandle; - UINT64 row; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p, RowCount %s, RowNumber %p)\n", StatementHandle, debugstr_sqlulen(RowCount), -- RowNumber); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, RowCount %s, RowNumber %p)\n", StatementHandle, debugstr_sqlulen(RowCount), +- RowNumber); + FIXME("(hstmt %p, crow %s, pirow %p)\n", hstmt, debugstr_sqlulen(crow), pirow); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - params.RowNumber = &row; - if (SUCCESS((ret = ODBC_CALL( SQLParamOptions, ¶ms )))) *RowNumber = row; @@ -1949,8 +1969,6 @@ index 658dda29a6c..89e4545f068 100644 - 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; + FIXME("(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, @@ -1958,6 +1976,8 @@ index 658dda29a6c..89e4545f068 100644 + debugstr_an((const char *)szProcName, cbProcName), cbProcName, + debugstr_an((const char *)szColumnName, cbColumnName), cbColumnName); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLProcedureColumns, ¶ms ); - TRACE("Returning %d\n", ret); @@ -2009,17 +2029,17 @@ index 658dda29a6c..89e4545f068 100644 - struct SQLSetPos_params params = { 0, RowNumber, Operation, LockType }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p, RowNumber %s, Operation %d, LockType %d)\n", StatementHandle, -- debugstr_sqlulen(RowNumber), Operation, LockType); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, RowNumber %s, Operation %d, LockType %d)\n", StatementHandle, +- debugstr_sqlulen(RowNumber), Operation, LockType); + FIXME("(hstmt %p, irow %s, fOption %d, fLock %d)\n", hstmt, debugstr_sqlulen(irow), fOption, fLock); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - if (SUCCESS(( ret = ODBC_CALL( SQLSetPos, ¶ms ))) && Operation == SQL_REFRESH) -- update_result_lengths( handle ); +- update_result_lengths( handle, SQL_PARAM_OUTPUT ); - TRACE("Returning %d\n", ret); return ret; } @@ -2075,23 +2095,23 @@ index 658dda29a6c..89e4545f068 100644 - DriverAttributes, BufferLength2, AttributesLength }; - struct handle *handle = EnvironmentHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_NO_DATA; + - 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 ); -+ SQLRETURN ret = SQL_NO_DATA; - -- 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"); + FIXME("(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); +- if (!handle) return SQL_INVALID_HANDLE; +- +- params.EnvironmentHandle = handle->unix_handle; +- ret = ODBC_CALL( SQLDrivers, ¶ms ); +- +- 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); return ret; } @@ -2113,20 +2133,20 @@ index 658dda29a6c..89e4545f068 100644 - struct handle *handle = StatementHandle; - UINT i = ParameterNumber - 1; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - 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); -- ++ SQLRETURN ret = SQL_ERROR; + - if (!handle) return SQL_INVALID_HANDLE; - if (!ParameterNumber) - { - FIXME( "parameter 0 not handled\n" ); - return SQL_ERROR; - } -- if (!alloc_binding( &handle->bind_parameter, ParameterNumber, handle->row_count )) return SQL_ERROR; +- if (!alloc_binding( &handle->bind_parameter, InputOutputType, ParameterNumber, handle->row_count )) return SQL_ERROR; + FIXME("(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); @@ -2153,19 +2173,19 @@ index 658dda29a6c..89e4545f068 100644 - BufferLength, Length2, DriverCompletion }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - 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); ++ SQLRETURN ret = SQL_ERROR; + +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(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); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLDriverConnect, ¶ms ); - TRACE("Returning %d\n", ret); @@ -2183,15 +2203,15 @@ index 658dda29a6c..89e4545f068 100644 - struct SQLSetScrollOptions_params params = { 0, Concurrency, KeySetSize, RowSetSize }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p, Concurrency %d, KeySetSize %s, RowSetSize %d)\n", StatementHandle, -- Concurrency, debugstr_sqllen(KeySetSize), RowSetSize); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, Concurrency %d, KeySetSize %s, RowSetSize %d)\n", StatementHandle, +- Concurrency, debugstr_sqllen(KeySetSize), RowSetSize); + FIXME("(statement_handle %p, f_concurrency %d, crow_keyset %s, crow_rowset %d)\n", statement_handle, + f_concurrency, debugstr_sqllen(crow_keyset), crow_rowset); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLSetScrollOptions, ¶ms ); - TRACE("Returning %d\n", ret); @@ -2247,16 +2267,16 @@ index 658dda29a6c..89e4545f068 100644 - TRACE("(StatementHandle %p, ColumnNumber %d, FieldIdentifier %d, CharacterAttributes %p, BufferLength %d, " - "StringLength %p, NumericAttributes %p)\n", StatementHandle, ColumnNumber, FieldIdentifier, - CharacterAttributes, BufferLength, StringLength, NumericAttributes); -+ SQLRETURN ret = SQL_ERROR; - +- - if (!handle) return SQL_INVALID_HANDLE; -+ FIXME("(hstmt %p, icol %d, fDescType %d, rgbDesc %p, cbDescMax %d, pcbDesc %p, pfDesc %p)\n", hstmt, icol, -+ fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc); ++ SQLRETURN ret = SQL_ERROR; - params.StatementHandle = handle->unix_handle; - params.NumericAttributes = &attrs; - if (SUCCESS((ret = ODBC_CALL( SQLColAttributesW, ¶ms )))) *NumericAttributes = attrs; -- ++ FIXME("(hstmt %p, icol %d, fDescType %d, rgbDesc %p, cbDescMax %d, pcbDesc %p, pfDesc %p)\n", hstmt, icol, ++ fDescType, rgbDesc, cbDescMax, pcbDesc, pfDesc); + - if (ret == SQL_SUCCESS && SQLColAttributes_KnownStringAttribute(FieldIdentifier) && CharacterAttributes && - StringLength && *StringLength != wcslen(CharacterAttributes) * 2) - { @@ -2268,7 +2288,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2088,20 +1221,12 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, WCHAR *ServerName, SQLSMA +@@ -2110,20 +1221,12 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, WCHAR *ServerName, SQLSMA WCHAR *UserName, SQLSMALLINT NameLength2, WCHAR *Authentication, SQLSMALLINT NameLength3) { @@ -2291,7 +2311,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2112,36 +1237,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu +@@ -2134,36 +1237,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, SQLSMALLINT *DataType, SQLULEN *ColumnSize, SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable) { @@ -2331,7 +2351,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2149,28 +1253,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu +@@ -2171,28 +1253,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu * SQLErrorW [ODBC32.110] */ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle, @@ -2364,7 +2384,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2179,18 +1270,11 @@ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, +@@ -2201,18 +1270,11 @@ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, */ SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLINTEGER TextLength) { @@ -2385,7 +2405,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2200,18 +1284,11 @@ SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *StatementText, +@@ -2222,18 +1284,11 @@ SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength) { @@ -2406,7 +2426,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2220,18 +1297,11 @@ SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, +@@ -2242,18 +1297,11 @@ SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, */ SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLINTEGER TextLength) { @@ -2427,7 +2447,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2240,18 +1310,11 @@ SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQL +@@ -2262,18 +1310,11 @@ SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQL */ SQLRETURN WINAPI SQLSetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, SQLSMALLINT NameLength) { @@ -2448,7 +2468,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2263,30 +1326,12 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN +@@ -2285,30 +1326,12 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLLEN *NumericAttribute) { @@ -2468,7 +2488,7 @@ index 658dda29a6c..89e4545f068 100644 - - params.StatementHandle = handle->unix_handle; - params.NumericAttribute = &attr; -- if (SUCCESS((ret = ODBC_CALL( SQLColAttributeW, ¶ms )))) *NumericAttribute = attr; +- if (SUCCESS((ret = ODBC_CALL( SQLColAttributeW, ¶ms ))) && NumericAttribute) *NumericAttribute = attr; - - if (ret == SQL_SUCCESS && CharacterAttribute != NULL && SQLColAttributes_KnownStringAttribute(FieldIdentifier) && - StringLength && *StringLength != wcslen(CharacterAttribute) * 2) @@ -2481,7 +2501,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2296,18 +1341,11 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN +@@ -2318,18 +1341,11 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -2502,7 +2522,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2317,18 +1355,11 @@ SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu +@@ -2339,18 +1355,11 @@ SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu SQLRETURN WINAPI SQLGetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -2523,7 +2543,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2340,22 +1371,12 @@ SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber +@@ -2362,22 +1371,12 @@ SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision, SQLSMALLINT *Scale, SQLSMALLINT *Nullable) { @@ -2548,7 +2568,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2366,43 +1387,27 @@ SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLS +@@ -2388,43 +1387,27 @@ SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLS SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -2600,7 +2620,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2412,11 +1417,9 @@ SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA +@@ -2434,11 +1417,9 @@ SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -2614,7 +2634,7 @@ index 658dda29a6c..89e4545f068 100644 Attribute, Value, BufferLength, StringLength); if (!Value) -@@ -2425,11 +1428,6 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -2447,11 +1428,6 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, return SQL_ERROR; } @@ -2626,7 +2646,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2439,18 +1437,11 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -2461,18 +1437,11 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -2648,7 +2668,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2461,21 +1452,14 @@ SQLRETURN WINAPI SQLColumnsW(SQLHSTMT StatementHandle, WCHAR *CatalogName, SQLSM +@@ -2483,21 +1452,14 @@ SQLRETURN WINAPI SQLColumnsW(SQLHSTMT StatementHandle, WCHAR *CatalogName, SQLSM WCHAR *SchemaName, SQLSMALLINT NameLength2, WCHAR *TableName, SQLSMALLINT NameLength3, WCHAR *ColumnName, SQLSMALLINT NameLength4) { @@ -2673,7 +2693,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2486,21 +1470,13 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl +@@ -2508,21 +1470,13 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl SQLSMALLINT Length, WCHAR *OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT *Length2, SQLUSMALLINT DriverCompletion) { @@ -2697,7 +2717,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2509,17 +1485,10 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl +@@ -2531,17 +1485,10 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl */ SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value) { @@ -2717,7 +2737,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2529,18 +1498,11 @@ SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Opt +@@ -2551,18 +1498,11 @@ SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Opt SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -2738,7 +2758,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2549,17 +1511,10 @@ SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQ +@@ -2571,17 +1511,10 @@ SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQ */ SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType) { @@ -2758,7 +2778,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2568,17 +1523,10 @@ SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType) +@@ -2590,17 +1523,10 @@ SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType) */ SQLRETURN WINAPI SQLSetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value) { @@ -2778,7 +2798,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2590,21 +1538,13 @@ SQLRETURN WINAPI SQLSpecialColumnsW(SQLHSTMT StatementHandle, SQLUSMALLINT Ident +@@ -2612,21 +1538,13 @@ SQLRETURN WINAPI SQLSpecialColumnsW(SQLHSTMT StatementHandle, SQLUSMALLINT Ident SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SQLUSMALLINT Nullable) { @@ -2802,7 +2822,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2615,21 +1555,13 @@ SQLRETURN WINAPI SQLStatisticsW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, +@@ -2637,21 +1555,13 @@ SQLRETURN WINAPI SQLStatisticsW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved) { @@ -2826,7 +2846,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2640,71 +1572,47 @@ SQLRETURN WINAPI SQLTablesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQL +@@ -2662,71 +1572,47 @@ SQLRETURN WINAPI SQLTablesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQL SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLWCHAR *TableType, SQLSMALLINT NameLength4) { @@ -2863,16 +2883,16 @@ index 658dda29a6c..89e4545f068 100644 - BufferLength, StringLength2 }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("(ConnectionHandle %p, InConnectionString %s, StringLength1 %d, OutConnectionString %p, BufferLength %d, " - "StringLength2 %p)\n", ConnectionHandle, debugstr_wn(InConnectionString, StringLength1), StringLength1, - OutConnectionString, BufferLength, StringLength2); ++ SQLRETURN ret = SQL_ERROR; + +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hdbc %p, szConnStrIn %s, cbConnStrIn %d, szConnStrOut %p, cbConnStrOutMax %d, pcbConnStrOut %p)\n", + hdbc, debugstr_wn(szConnStrIn, cbConnStrIn), cbConnStrIn, szConnStrOut, cbConnStrOutMax, pcbConnStrOut); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLBrowseConnectW, ¶ms ); - TRACE("Returning %d\n", ret); @@ -2893,16 +2913,14 @@ index 658dda29a6c..89e4545f068 100644 - TableName, NameLength3, ColumnName, NameLength4 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - 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); -+ SQLRETURN ret = SQL_ERROR; - -- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(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, @@ -2910,13 +2928,15 @@ index 658dda29a6c..89e4545f068 100644 + debugstr_wn(szTableName, cbTableName), cbTableName, + debugstr_wn(szColumnName, cbColumnName), cbColumnName); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLColumnPrivilegesW, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -2715,215 +1623,136 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi +@@ -2737,215 +1623,136 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, WCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2) { @@ -2968,7 +2988,8 @@ index 658dda29a6c..89e4545f068 100644 - FkSchemaName, NameLength5, FkTableName, NameLength6 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - 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, @@ -2978,9 +2999,6 @@ index 658dda29a6c..89e4545f068 100644 - debugstr_wn(FkCatalogName, NameLength4), NameLength4, - debugstr_wn(FkSchemaName, NameLength5), NameLength5, - debugstr_wn(FkTableName, NameLength6), NameLength6); -+ SQLRETURN ret = SQL_ERROR; - -- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(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, @@ -2991,6 +3009,8 @@ index 658dda29a6c..89e4545f068 100644 + debugstr_wn(szFkSchemaName, cbFkSchemaName), cbFkSchemaName, + debugstr_wn(szFkTableName, cbFkTableName), cbFkTableName); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLForeignKeysW, ¶ms ); - TRACE("Returning %d\n", ret); @@ -3009,16 +3029,16 @@ index 658dda29a6c..89e4545f068 100644 - TextLength2 }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - TRACE("(ConnectionHandle %p, InStatementText %s, TextLength1 %d, OutStatementText %p, BufferLength %d, " - "TextLength2 %p)\n", ConnectionHandle, debugstr_wn(InStatementText, TextLength1), TextLength1, - OutStatementText, BufferLength, TextLength2); ++ SQLRETURN ret = SQL_ERROR; + +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(hdbc %p, szSqlStrIn %s, cbSqlStrIn %d, szSqlStr %p, cbSqlStrMax %d, pcbSqlStr %p)\n", hdbc, + debugstr_wn(szSqlStrIn, cbSqlStrIn), cbSqlStrIn, szSqlStr, cbSqlStrMax, pcbSqlStr); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLNativeSqlW, ¶ms ); - TRACE("Returning %d\n", ret); @@ -3039,21 +3059,21 @@ index 658dda29a6c..89e4545f068 100644 - NameLength2 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - 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); -+ SQLRETURN ret = SQL_ERROR; - -- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(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); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLPrimaryKeysW, ¶ms ); - TRACE("Returning %d\n", ret); @@ -3111,17 +3131,17 @@ index 658dda29a6c..89e4545f068 100644 - NameLength3 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -+ SQLRETURN ret = SQL_ERROR; - +- - 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); ++ SQLRETURN ret = SQL_ERROR; + +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(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); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLProceduresW, ¶ms ); - TRACE("Returning %d\n", ret); @@ -3142,17 +3162,17 @@ index 658dda29a6c..89e4545f068 100644 - NameLength3 }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- ++ SQLRETURN ret = SQL_ERROR; + - 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); -+ SQLRETURN ret = SQL_ERROR; - -- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(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); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLTablePrivilegesW, ¶ms ); - TRACE("Returning %d\n", ret); @@ -3178,16 +3198,16 @@ index 658dda29a6c..89e4545f068 100644 - 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; + SQLRETURN ret = SQL_NO_DATA; -- params.EnvironmentHandle = handle->unix_handle; -- ret = ODBC_CALL( SQLDriversW, ¶ms ); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(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); +- params.EnvironmentHandle = handle->unix_handle; +- ret = ODBC_CALL( SQLDriversW, ¶ms ); +- - 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"); - @@ -3195,7 +3215,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2933,18 +1762,11 @@ SQLRETURN WINAPI SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, +@@ -2955,18 +1762,11 @@ SQLRETURN WINAPI SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength) { @@ -3216,7 +3236,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2954,28 +1776,11 @@ SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumb +@@ -2976,28 +1776,11 @@ SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumb SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -3226,10 +3246,10 @@ index 658dda29a6c..89e4545f068 100644 - - TRACE("(StatementHandle %p, Attribute %d, Value %p, StringLength %d)\n", StatementHandle, Attribute, - Value, StringLength); -- -- if (!handle) return SQL_INVALID_HANDLE; + SQLRETURN ret = SQL_ERROR; +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - if (SUCCESS((ret = ODBC_CALL( SQLSetStmtAttrW, ¶ms )))) - { @@ -3248,7 +3268,7 @@ index 658dda29a6c..89e4545f068 100644 return ret; } -@@ -2983,34 +1788,14 @@ SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -3005,34 +1788,14 @@ SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, * SQLGetDiagRecA [ODBC32.236] */ SQLRETURN WINAPI SQLGetDiagRecA(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, @@ -3259,15 +3279,15 @@ index 658dda29a6c..89e4545f068 100644 - return SQLGetDiagRec( HandleType, Handle, RecNumber, SqlState, NativeError, MessageText, BufferLength, - TextLength ); -} -+ SQLRETURN ret = SQL_ERROR; - +- -/*********************************************************************** - * DllMain [Internal] Initializes the internal 'ODBC32.DLL'. - */ -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved) -{ - TRACE("proxy ODBC: %p,%lx,%p\n", hinstDLL, reason, reserved); -- ++ SQLRETURN ret = SQL_ERROR; + - switch (reason) - { - case DLL_PROCESS_ATTACH: @@ -6968,1269 +6988,6 @@ index cc963c5a893..00000000000 -C_ASSERT( ARRAYSIZE( __wine_unix_call_wow64_funcs) == unix_funcs_count ); - -#endif /* _WIN64 */ -diff --git a/dlls/odbc32/unixlib.h b/dlls/odbc32/unixlib.h -deleted file mode 100644 -index c021eb22c50..00000000000 ---- a/dlls/odbc32/unixlib.h -+++ /dev/null -@@ -1,1257 +0,0 @@ --/* -- * Win32 ODBC functions -- * -- * Copyright 1999 Xiang Li, Corel Corporation -- * -- * 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 -- * -- * 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. -- */ -- --#include --#include "windef.h" --#include "winbase.h" --#include "wine/unixlib.h" -- --static inline BOOL SUCCESS( SQLRETURN ret ) { return ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO; } -- --enum sql_funcs --{ -- process_attach, -- unix_SQLAllocConnect, -- unix_SQLAllocEnv, -- unix_SQLAllocHandle, -- unix_SQLAllocHandleStd, -- unix_SQLAllocStmt, -- unix_SQLBindCol, -- unix_SQLBindParam, -- unix_SQLBindParameter, -- unix_SQLBrowseConnect, -- unix_SQLBrowseConnectW, -- unix_SQLBulkOperations, -- unix_SQLCancel, -- unix_SQLCloseCursor, -- unix_SQLColAttribute, -- unix_SQLColAttributeW, -- unix_SQLColAttributes, -- unix_SQLColAttributesW, -- unix_SQLColumnPrivileges, -- unix_SQLColumnPrivilegesW, -- unix_SQLColumns, -- unix_SQLColumnsW, -- unix_SQLConnect, -- unix_SQLConnectW, -- unix_SQLCopyDesc, -- unix_SQLDataSources, -- unix_SQLDataSourcesW, -- unix_SQLDescribeCol, -- unix_SQLDescribeColW, -- unix_SQLDescribeParam, -- unix_SQLDisconnect, -- unix_SQLDriverConnect, -- unix_SQLDriverConnectW, -- unix_SQLDrivers, -- unix_SQLDriversW, -- unix_SQLEndTran, -- unix_SQLError, -- unix_SQLErrorW, -- unix_SQLExecDirect, -- unix_SQLExecDirectW, -- unix_SQLExecute, -- unix_SQLExtendedFetch, -- unix_SQLFetch, -- unix_SQLFetchScroll, -- unix_SQLForeignKeys, -- unix_SQLForeignKeysW, -- unix_SQLFreeConnect, -- unix_SQLFreeEnv, -- unix_SQLFreeHandle, -- unix_SQLFreeStmt, -- unix_SQLGetConnectAttr, -- unix_SQLGetConnectAttrW, -- unix_SQLGetConnectOption, -- unix_SQLGetConnectOptionW, -- unix_SQLGetCursorName, -- unix_SQLGetCursorNameW, -- unix_SQLGetData, -- unix_SQLGetDescField, -- unix_SQLGetDescFieldW, -- unix_SQLGetDescRec, -- unix_SQLGetDescRecW, -- unix_SQLGetDiagField, -- unix_SQLGetDiagFieldW, -- unix_SQLGetDiagRec, -- unix_SQLGetDiagRecW, -- unix_SQLGetEnvAttr, -- unix_SQLGetFunctions, -- unix_SQLGetInfo, -- unix_SQLGetInfoW, -- unix_SQLGetStmtAttr, -- unix_SQLGetStmtAttrW, -- unix_SQLGetStmtOption, -- unix_SQLGetTypeInfo, -- unix_SQLGetTypeInfoW, -- unix_SQLMoreResults, -- unix_SQLNativeSql, -- unix_SQLNativeSqlW, -- unix_SQLNumParams, -- unix_SQLNumResultCols, -- unix_SQLParamData, -- unix_SQLParamOptions, -- unix_SQLPrepare, -- unix_SQLPrepareW, -- unix_SQLPrimaryKeys, -- unix_SQLPrimaryKeysW, -- unix_SQLProcedureColumns, -- unix_SQLProcedureColumnsW, -- unix_SQLProcedures, -- unix_SQLProceduresW, -- unix_SQLPutData, -- unix_SQLRowCount, -- unix_SQLSetConnectAttr, -- unix_SQLSetConnectAttrW, -- unix_SQLSetConnectOption, -- unix_SQLSetConnectOptionW, -- unix_SQLSetCursorName, -- unix_SQLSetCursorNameW, -- unix_SQLSetDescField, -- unix_SQLSetDescFieldW, -- unix_SQLSetDescRec, -- unix_SQLSetEnvAttr, -- unix_SQLSetParam, -- unix_SQLSetPos, -- unix_SQLSetScrollOptions, -- unix_SQLSetStmtAttr, -- unix_SQLSetStmtAttrW, -- unix_SQLSetStmtOption, -- unix_SQLSpecialColumns, -- unix_SQLSpecialColumnsW, -- unix_SQLStatistics, -- unix_SQLStatisticsW, -- unix_SQLTablePrivileges, -- unix_SQLTablePrivilegesW, -- unix_SQLTables, -- unix_SQLTablesW, -- unix_SQLTransact, -- unix_funcs_count --}; -- --struct param --{ -- UINT8 *len; /* result length array 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; -- UINT32 row_count; /* number of rows returned by SQLFetch() */ --}; -- --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; -- void *StrLen_or_Ind; --}; -- --struct SQLBindParam_params --{ -- UINT64 StatementHandle; -- UINT16 ParameterNumber; -- INT16 ValueType; -- INT16 ParameterType; -- UINT64 LengthPrecision; -- INT16 ParameterScale; -- void *ParameterValue; -- void *StrLen_or_Ind; --}; -- --struct SQLBindParameter_params --{ -- UINT64 StatementHandle; -- UINT16 ParameterNumber; -- INT16 InputOutputType; -- INT16 ValueType; -- INT16 ParameterType; -- UINT64 ColumnSize; -- INT16 DecimalDigits; -- void *ParameterValue; -- INT64 BufferLength; -- void *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; --}; -- 2.43.0 diff --git a/patches/oledb32-mode-property/0001-oledb32-Support-Multiple-values-when-parsing-the-pro.patch b/patches/oledb32-mode-property/0001-oledb32-Support-Multiple-values-when-parsing-the-pro.patch deleted file mode 100644 index c48b8567..00000000 --- a/patches/oledb32-mode-property/0001-oledb32-Support-Multiple-values-when-parsing-the-pro.patch +++ /dev/null @@ -1,102 +0,0 @@ -From a954250ce33000b242124b933e1607566782dade Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Sat, 8 Jun 2024 16:26:54 +1000 -Subject: [PATCH] oledb32: Support Multiple values when parsing the property - Mode. - -The "Mode" can be a mix of any of the flags. ---- - dlls/oledb32/datainit.c | 40 +++++++++++++++++++++++++++++------ - dlls/oledb32/tests/database.c | 14 ++++++++++++ - 2 files changed, 48 insertions(+), 6 deletions(-) - -diff --git a/dlls/oledb32/datainit.c b/dlls/oledb32/datainit.c -index 38ed5ce0e53..1c0a531ab26 100644 ---- a/dlls/oledb32/datainit.c -+++ b/dlls/oledb32/datainit.c -@@ -335,16 +335,44 @@ static HRESULT convert_dbproperty_mode(const WCHAR *src, VARIANT *dest) - { L"Write", DB_MODE_WRITE }, - }; - struct mode_propval *prop; -+ WCHAR mode[64]; -+ WCHAR *pos = NULL; -+ const WCHAR *lastpos = src; - -- if ((prop = bsearch(src, mode_propvals, ARRAY_SIZE(mode_propvals), -- sizeof(struct mode_propval), dbmodeprop_compare))) -+ V_VT(dest) = VT_I4; -+ V_I4(dest) = 0; -+ -+ pos = wcsstr(src, L"|"); -+ while (pos != NULL) - { -- V_VT(dest) = VT_I4; -- V_I4(dest) = prop->value; -- TRACE("%s = %#lx\n", debugstr_w(src), prop->value); -- return S_OK; -+ lstrcpynW(mode, lastpos, pos - lastpos + 1); -+ -+ if (!(prop = bsearch(mode, mode_propvals, ARRAY_SIZE(mode_propvals), -+ sizeof(struct mode_propval), dbmodeprop_compare))) -+ goto done; -+ -+ V_I4(dest) |= prop->value; -+ -+ lastpos = pos + 1; -+ pos = wcsstr(lastpos, L"|"); - } - -+ if (lastpos) -+ { -+ lstrcpyW(mode, lastpos); -+ if (!(prop = bsearch(mode, mode_propvals, ARRAY_SIZE(mode_propvals), -+ sizeof(struct mode_propval), dbmodeprop_compare))) -+ goto done; -+ -+ V_I4(dest) |= prop->value; -+ } -+ -+ TRACE("%s = %#lx\n", debugstr_w(src), V_I4(dest)); -+ return S_OK; -+ -+done: -+ FIXME("Failed to parse Mode (%s)\n", debugstr_w(src)); -+ - return E_FAIL; - } - -diff --git a/dlls/oledb32/tests/database.c b/dlls/oledb32/tests/database.c -index 6296ecfe1ef..bcee13017a7 100644 ---- a/dlls/oledb32/tests/database.c -+++ b/dlls/oledb32/tests/database.c -@@ -557,6 +557,8 @@ static void test_initializationstring(void) - static const WCHAR *initstring_mode = L"Provider=MSDASQL.1;Data Source=dummy;Mode=invalid"; - static const WCHAR *initstring_mode2 = L"Provider=MSDASQL.1;Data Source=dummy;Mode=WriteRead"; - static const WCHAR *initstring_mode3 = L"Provider=MSDASQL.1;Data Source=dummy;Mode=ReadWRITE"; -+ static const WCHAR *initstring_mode4 = L"Provider=MSDASQL.1;Data Source=dummy;Mode=ReadWrite|Share Deny None"; -+ static const WCHAR *initstring_mode5 = L"Provider=MSDASQL.1;Data Source=dummy;Mode=ReadWrite|Share Deny None|Share Exclusive"; - static const WCHAR *initstring_quote_semicolon = L"Provider=MSDASQL.1;" - "Data Source=dummy;" - "Extended Properties=\"ConnectTo=11.0;Cell Error Mode=TextValue;Optimize Response=3;\""; -@@ -625,6 +627,18 @@ static void test_initializationstring(void) - &IID_IDBInitialize, (IUnknown **)&dbinit); - ok(hr == S_OK, "got 0x%08lx\n", hr); - IDBInitialize_Release(dbinit); -+ -+ dbinit = NULL; -+ hr = IDataInitialize_GetDataSource(datainit, NULL, CLSCTX_INPROC_SERVER, (WCHAR *)initstring_mode4, -+ &IID_IDBInitialize, (IUnknown **)&dbinit); -+ ok(hr == S_OK, "got 0x%08lx\n", hr); -+ IDBInitialize_Release(dbinit); -+ -+ dbinit = NULL; -+ hr = IDataInitialize_GetDataSource(datainit, NULL, CLSCTX_INPROC_SERVER, (WCHAR *)initstring_mode5, -+ &IID_IDBInitialize, (IUnknown **)&dbinit); -+ ok(hr == S_OK, "got 0x%08lx\n", hr); -+ IDBInitialize_Release(dbinit); - } - else - ok(dbinit == NULL, "got %p\n", dbinit); --- -2.43.0 - diff --git a/patches/oledb32-mode-property/definition b/patches/oledb32-mode-property/definition deleted file mode 100644 index 2006f802..00000000 --- a/patches/oledb32-mode-property/definition +++ /dev/null @@ -1,6 +0,0 @@ -Fixes: [7955] oledb32: Mode can have multiple values as a string - -# Found while testing S-Hoai application. - -#PR: https://gitlab.winehq.org/wine/wine/-/merge_requests/5817 - diff --git a/staging/upstream-commit b/staging/upstream-commit index 33c7e943..a1228bfb 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -63e25f9edaf319529e87b380d01bff5cafa17f06 +96d294aa123497d3c5b0611d9de4787e3eb7fc6a