From bc1a2b81d652cac52462537431b599670149507c Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 21 Jun 2024 09:04:02 +1000 Subject: [PATCH] Rebase against 8c64979dcb2673659adacf39733e24d42b7fc01d. --- .../0001-odbc32-Remove-unixODBC-support.patch | 380 +++++++++++------- ...rt-for-absolute-rawinput-mouse-messa.patch | 12 +- ...hardware_message-flags-for-rawinput-.patch | 34 +- staging/upstream-commit | 2 +- 4 files changed, 250 insertions(+), 178 deletions(-) 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 7c086062..fde6c6df 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 632ab1b34fa94b82be14e36879cc22f3794a6e17 Mon Sep 17 00:00:00 2001 +From dbeaccad253f7854796985efcb59d50e80b387ff 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,9 +6,9 @@ Subject: [PATCH] odbc32: Remove unixODBC support --- configure.ac | 10 - dlls/odbc32/Makefile.in | 5 +- - dlls/odbc32/proxyodbc.c | 2073 +++++----------------- + dlls/odbc32/proxyodbc.c | 2145 +++++------------------ dlls/odbc32/unixlib.c | 3673 --------------------------------------- - 4 files changed, 419 insertions(+), 5342 deletions(-) + 4 files changed, 419 insertions(+), 5414 deletions(-) delete mode 100644 dlls/odbc32/unixlib.c diff --git a/configure.ac b/configure.ac @@ -49,7 +49,7 @@ index 0ec0ae8eaf4..a42f1473d67 100644 - unixlib.c + rsrc.rc diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c -index d97837e5bca..89e4545f068 100644 +index 47e0aff0b18..89e4545f068 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -40,46 +40,19 @@ @@ -213,7 +213,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -197,47 +118,17 @@ static const char *debugstr_sqllen( SQLLEN len ) +@@ -197,51 +118,17 @@ static const char *debugstr_sqllen( SQLLEN len ) #endif } @@ -256,6 +256,10 @@ index d97837e5bca..89e4545f068 100644 - return SQL_ERROR; - } - if (!alloc_binding( &handle->bind_col, SQL_PARAM_INPUT_OUTPUT, ColumnNumber, handle->row_count )) return SQL_ERROR; +- handle->bind_col.param[i].col.target_type = TargetType; +- handle->bind_col.param[i].col.target_value = TargetValue; +- handle->bind_col.param[i].col.buffer_length = BufferLength; +- - params.StatementHandle = handle->unix_handle; - 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; @@ -263,7 +267,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -257,29 +148,12 @@ SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNu +@@ -261,34 +148,12 @@ SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNu SQLSMALLINT ParameterType, SQLULEN LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLLEN *StrLen_or_Ind) { @@ -286,6 +290,11 @@ index d97837e5bca..89e4545f068 100644 - return SQL_ERROR; - } - if (!alloc_binding( &handle->bind_param, SQL_PARAM_INPUT, ParameterNumber, handle->row_count )) return SQL_ERROR; +- handle->bind_param.param[i].param.value_type = ValueType; +- handle->bind_param.param[i].param.parameter_type = ParameterType; +- handle->bind_param.param[i].param.length_precision = LengthPrecision; +- handle->bind_param.param[i].param.parameter_scale = ParameterScale; +- handle->bind_param.param[i].param.parameter_value = ParameterValue; - - params.StatementHandle = handle->unix_handle; - params.StrLen_or_Ind = handle->bind_param.param[i].len; @@ -295,40 +304,40 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -288,17 +162,10 @@ SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNu +@@ -297,17 +162,10 @@ SQLRETURN WINAPI SQLBindParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNu */ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle) { - struct SQLCancel_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( SQLCancel, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -307,43 +174,27 @@ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle) +@@ -316,43 +174,27 @@ SQLRETURN WINAPI SQLCancel(SQLHSTMT StatementHandle) */ SQLRETURN WINAPI SQLCloseCursor(SQLHSTMT StatementHandle) { - struct SQLCloseCursor_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( SQLCloseCursor, ¶ms ); - TRACE("Returning %d\n", ret); @@ -366,7 +375,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -354,23 +205,15 @@ SQLRETURN WINAPI SQLColumns(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLS +@@ -363,23 +205,15 @@ SQLRETURN WINAPI SQLColumns(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLS SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *ColumnName, SQLSMALLINT NameLength4) { @@ -392,7 +401,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -381,21 +224,14 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM +@@ -390,21 +224,14 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM SQLCHAR *UserName, SQLSMALLINT NameLength2, SQLCHAR *Authentication, SQLSMALLINT NameLength3) { @@ -416,20 +425,20 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -404,18 +240,10 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM +@@ -413,18 +240,10 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM */ SQLRETURN WINAPI SQLCopyDesc(SQLHDESC SourceDescHandle, SQLHDESC TargetDescHandle) { - struct SQLCopyDesc_params params; - struct handle *source = SourceDescHandle, *target = TargetDescHandle; - SQLRETURN ret; +- +- TRACE("(SourceDescHandle %p, TargetDescHandle %p)\n", SourceDescHandle, TargetDescHandle); + SQLRETURN ret = SQL_ERROR; -- TRACE("(SourceDescHandle %p, TargetDescHandle %p)\n", SourceDescHandle, TargetDescHandle); +- if (!source || !target) return SQL_INVALID_HANDLE; + 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 ); @@ -437,7 +446,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -426,28 +254,12 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle, SQLUSMALLINT Directio +@@ -435,28 +254,12 @@ SQLRETURN WINAPI SQLDataSources(SQLHENV EnvironmentHandle, SQLUSMALLINT Directio SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, SQLCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2) { @@ -468,7 +477,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -455,8 +267,13 @@ SQLRETURN WINAPI SQLDataSourcesA(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi +@@ -464,8 +267,13 @@ SQLRETURN WINAPI SQLDataSourcesA(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, SQLCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2) { @@ -484,7 +493,7 @@ index d97837e5bca..89e4545f068 100644 } /************************************************************************* -@@ -466,36 +283,12 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum +@@ -475,36 +283,12 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, SQLSMALLINT *DataType, SQLULEN *ColumnSize, SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable) { @@ -523,47 +532,47 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -504,17 +297,10 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum +@@ -513,17 +297,10 @@ SQLRETURN WINAPI SQLDescribeCol(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNum */ SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle) { - struct SQLDisconnect_params params; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -- -- TRACE("(ConnectionHandle %p)\n", ConnectionHandle); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(ConnectionHandle %p)\n", ConnectionHandle); + 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); return ret; } -@@ -523,17 +309,10 @@ SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle) +@@ -532,17 +309,10 @@ SQLRETURN WINAPI SQLDisconnect(SQLHDBC ConnectionHandle) */ SQLRETURN WINAPI SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT CompletionType) { - struct SQLEndTran_params params = { HandleType, 0, CompletionType }; - struct handle *handle = Handle; - SQLRETURN ret; +- +- TRACE("(HandleType %d, Handle %p, CompletionType %d)\n", HandleType, Handle, CompletionType); + SQLRETURN ret = SQL_ERROR; -- TRACE("(HandleType %d, Handle %p, CompletionType %d)\n", HandleType, Handle, CompletionType); +- if (!handle) return SQL_INVALID_HANDLE; + 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); return ret; } -@@ -541,28 +320,15 @@ SQLRETURN WINAPI SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLIN +@@ -550,28 +320,15 @@ SQLRETURN WINAPI SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLIN * SQLError [ODBC32.010] */ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle, @@ -580,7 +589,8 @@ index d97837e5bca..89e4545f068 100644 + FIXME("(EnvironmentHandle %p, ConnectionHandle %p, StatementHandle %p, Sqlstate %p, NativeError %p," " MessageText %p, BufferLength %d, TextLength %p)\n", EnvironmentHandle, ConnectionHandle, - StatementHandle, SqlState, NativeError, MessageText, BufferLength, TextLength); -- ++ StatementHandle, Sqlstate, NativeError, MessageText, BufferLength, TextLength); + - if (env) params.EnvironmentHandle = env->unix_handle; - if (con) params.ConnectionHandle = con->unix_handle; - if (stmt) params.StatementHandle = stmt->unix_handle; @@ -590,13 +600,12 @@ index d97837e5bca..89e4545f068 100644 - TRACE(" Error %d\n", *NativeError); - TRACE(" MessageText %s\n", debugstr_an((const char *)MessageText, *TextLength)); - } -+ StatementHandle, Sqlstate, NativeError, MessageText, BufferLength, TextLength); - +- - TRACE("Returning %d\n", ret); return ret; } -@@ -571,98 +337,23 @@ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, S +@@ -580,98 +337,23 @@ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, S */ SQLRETURN WINAPI SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength) { @@ -685,13 +694,13 @@ index d97837e5bca..89e4545f068 100644 - struct SQLExecute_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; - update_result_lengths( handle, SQL_PARAM_INPUT ); - if (SUCCESS(( ret = ODBC_CALL( SQLExecute, ¶ms )))) update_result_lengths( handle, SQL_PARAM_OUTPUT ); @@ -699,27 +708,27 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -671,17 +362,10 @@ SQLRETURN WINAPI SQLExecute(SQLHSTMT StatementHandle) +@@ -680,17 +362,10 @@ SQLRETURN WINAPI SQLExecute(SQLHSTMT StatementHandle) */ SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle) { - struct SQLFetch_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; - if (SUCCESS(( ret = ODBC_CALL( SQLFetch, ¶ms )))) update_result_lengths( handle, SQL_PARAM_OUTPUT ); - TRACE("Returning %d\n", ret); return ret; } -@@ -690,18 +374,11 @@ SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle) +@@ -699,18 +374,11 @@ SQLRETURN WINAPI SQLFetch(SQLHSTMT StatementHandle) */ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrientation, SQLLEN FetchOffset) { @@ -740,20 +749,20 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -710,18 +387,10 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien +@@ -719,18 +387,10 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien */ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) { - struct SQLFreeConnect_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( SQLFreeConnect, ¶ms ); - free( handle ); @@ -761,20 +770,20 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -730,59 +399,22 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) +@@ -739,59 +399,22 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle) */ SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle) { - struct SQLFreeEnv_params params; - struct handle *handle = EnvironmentHandle; - SQLRETURN ret; -- -- TRACE("(EnvironmentHandle %p)\n", EnvironmentHandle); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(EnvironmentHandle %p)\n", EnvironmentHandle); + FIXME("(EnvironmentHandle %p)\n", EnvironmentHandle); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.EnvironmentHandle = handle->unix_handle; - ret = ODBC_CALL( SQLFreeEnv, ¶ms ); - free( handle ); @@ -809,13 +818,13 @@ index d97837e5bca..89e4545f068 100644 - struct SQLFreeHandle_params params; - struct handle *handle = Handle; - SQLRETURN ret; -- -- TRACE("(HandleType %d, Handle %p)\n", HandleType, Handle); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(HandleType %d, Handle %p)\n", HandleType, Handle); + FIXME("(HandleType %d, Handle %p)\n", HandleType, Handle); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.HandleType = HandleType; - params.Handle = handle->unix_handle; - ret = ODBC_CALL( SQLFreeHandle, ¶ms ); @@ -825,20 +834,20 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -791,20 +423,10 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) +@@ -800,20 +423,10 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle) */ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) { - struct SQLFreeStmt_params params; - struct handle *handle = StatementHandle; - SQLRETURN ret; +- +- TRACE("(StatementHandle %p, Option %d)\n", StatementHandle, Option); + SQLRETURN ret = SQL_ERROR; -- TRACE("(StatementHandle %p, Option %d)\n", StatementHandle, Option); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(StatementHandle %p, Option %d)\n", StatementHandle, Option); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - params.Option = Option; - ret = ODBC_CALL( SQLFreeStmt, ¶ms ); @@ -848,7 +857,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -814,18 +436,11 @@ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) +@@ -823,18 +436,11 @@ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option) SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -869,27 +878,27 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -834,17 +449,10 @@ SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut +@@ -843,17 +449,10 @@ SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut */ SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value) { - struct SQLGetConnectOption_params params = { 0, Option, Value }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; +- +- TRACE("(ConnectionHandle %p, Option %d, Value %p)\n", ConnectionHandle, Option, Value); + SQLRETURN ret = SQL_ERROR; -- TRACE("(ConnectionHandle %p, Option %d, Value %p)\n", ConnectionHandle, Option, Value); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(ConnectionHandle %p, Option %d, Value %p)\n", ConnectionHandle, Option, Value); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLGetConnectOption, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -854,18 +462,11 @@ SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti +@@ -863,18 +462,11 @@ SQLRETURN WINAPI SQLGetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength) { @@ -910,7 +919,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -875,20 +476,11 @@ SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, +@@ -884,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) { @@ -933,7 +942,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -898,18 +490,11 @@ SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, +@@ -907,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) { @@ -954,7 +963,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -921,22 +506,12 @@ SQLRETURN WINAPI SQLGetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, +@@ -930,22 +506,12 @@ SQLRETURN WINAPI SQLGetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision, SQLSMALLINT *Scale, SQLSMALLINT *Nullable) { @@ -979,7 +988,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -947,19 +522,11 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM +@@ -956,19 +522,11 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -1001,7 +1010,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -967,23 +534,15 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM +@@ -976,23 +534,15 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM * SQLGetDiagRec [ODBC32.036] */ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, @@ -1029,7 +1038,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -993,18 +552,11 @@ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMAL +@@ -1002,18 +552,11 @@ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMAL SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -1050,27 +1059,27 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1013,17 +565,10 @@ SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, +@@ -1022,17 +565,10 @@ SQLRETURN WINAPI SQLGetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT FunctionId, SQLUSMALLINT *Supported) { - struct SQLGetFunctions_params params = { 0, FunctionId, Supported }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; +- +- TRACE("(ConnectionHandle %p, FunctionId %d, Supported %p)\n", ConnectionHandle, FunctionId, Supported); + SQLRETURN ret = SQL_ERROR; -- TRACE("(ConnectionHandle %p, FunctionId %d, Supported %p)\n", ConnectionHandle, FunctionId, Supported); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(ConnectionHandle %p, FunctionId %d, Supported %p)\n", ConnectionHandle, FunctionId, Supported); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLGetFunctions, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1033,18 +578,11 @@ SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT Function +@@ -1042,18 +578,11 @@ SQLRETURN WINAPI SQLGetFunctions(SQLHDBC ConnectionHandle, SQLUSMALLINT Function SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -1091,7 +1100,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1054,11 +592,9 @@ SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQL +@@ -1063,11 +592,9 @@ SQLRETURN WINAPI SQLGetInfo(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQL SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -1105,7 +1114,7 @@ index d97837e5bca..89e4545f068 100644 Attribute, Value, BufferLength, StringLength); if (!Value) -@@ -1067,11 +603,6 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -1076,11 +603,6 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, return SQL_ERROR; } @@ -1117,87 +1126,87 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1080,17 +611,10 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -1089,17 +611,10 @@ SQLRETURN WINAPI SQLGetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLPOINTER Value) { - struct SQLGetStmtOption_params params = { 0, Option, Value }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p, Option %d, Value %p)\n", StatementHandle, Option, Value); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, Option %d, Value %p)\n", StatementHandle, Option, Value); + FIXME("(StatementHandle %p, Option %d, Value %p)\n", StatementHandle, Option, Value); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLGetStmtOption, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1099,17 +623,10 @@ SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, +@@ -1108,17 +623,10 @@ SQLRETURN WINAPI SQLGetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, */ SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType) { - struct SQLGetTypeInfo_params params = { 0, DataType }; - struct handle *handle = StatementHandle; - SQLRETURN ret; +- +- TRACE("(StatementHandle %p, DataType %d)\n", StatementHandle, DataType); + SQLRETURN ret = SQL_ERROR; -- TRACE("(StatementHandle %p, DataType %d)\n", StatementHandle, DataType); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(StatementHandle %p, DataType %d)\n", StatementHandle, DataType); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLGetTypeInfo, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1118,17 +635,10 @@ SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType) +@@ -1127,17 +635,10 @@ SQLRETURN WINAPI SQLGetTypeInfo(SQLHSTMT StatementHandle, SQLSMALLINT DataType) */ SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount) { - struct SQLNumResultCols_params params = { 0, ColumnCount }; - struct handle *handle = StatementHandle; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p, ColumnCount %p)\n", StatementHandle, ColumnCount); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, ColumnCount %p)\n", StatementHandle, ColumnCount); + FIXME("(StatementHandle %p, ColumnCount %p)\n", StatementHandle, ColumnCount); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLNumResultCols, ¶ms ); - TRACE("Returning %d ColumnCount %d\n", ret, *ColumnCount); return ret; } -@@ -1137,17 +647,10 @@ SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnC +@@ -1146,17 +647,10 @@ SQLRETURN WINAPI SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnC */ SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value) { - struct SQLParamData_params params = { 0, Value }; - struct handle *handle = StatementHandle; - SQLRETURN ret; +- +- TRACE("(StatementHandle %p, Value %p)\n", StatementHandle, Value); + SQLRETURN ret = SQL_ERROR; -- TRACE("(StatementHandle %p, Value %p)\n", StatementHandle, Value); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(StatementHandle %p, Value %p)\n", StatementHandle, Value); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLParamData, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1156,18 +659,11 @@ SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value) +@@ -1165,18 +659,11 @@ SQLRETURN WINAPI SQLParamData(SQLHSTMT StatementHandle, SQLPOINTER *Value) */ SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength) { @@ -1218,27 +1227,27 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1176,17 +672,10 @@ SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQ +@@ -1185,17 +672,10 @@ SQLRETURN WINAPI SQLPrepare(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQ */ SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN StrLen_or_Ind) { - struct SQLPutData_params params = { 0, Data, StrLen_or_Ind }; - struct handle *handle = StatementHandle; - SQLRETURN ret; +- +- TRACE("(StatementHandle %p, Data %p, StrLen_or_Ind %s)\n", StatementHandle, Data, debugstr_sqllen(StrLen_or_Ind)); + SQLRETURN ret = SQL_ERROR; -- TRACE("(StatementHandle %p, Data %p, StrLen_or_Ind %s)\n", StatementHandle, Data, debugstr_sqllen(StrLen_or_Ind)); +- if (!handle) return SQL_INVALID_HANDLE; + FIXME("(StatementHandle %p, Data %p, StrLen_or_Ind %s)\n", StatementHandle, Data, debugstr_sqllen(StrLen_or_Ind)); -- if (!handle) return SQL_INVALID_HANDLE; -- - params.StatementHandle = handle->unix_handle; - ret = ODBC_CALL( SQLPutData, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1195,23 +684,10 @@ SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN St +@@ -1204,23 +684,10 @@ SQLRETURN WINAPI SQLPutData(SQLHSTMT StatementHandle, SQLPOINTER Data, SQLLEN St */ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount) { @@ -1246,13 +1255,13 @@ index d97837e5bca..89e4545f068 100644 - struct handle *handle = StatementHandle; - INT64 count; - SQLRETURN ret; -- -- TRACE("(StatementHandle %p, RowCount %p)\n", StatementHandle, RowCount); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(StatementHandle %p, RowCount %p)\n", StatementHandle, RowCount); + FIXME("(StatementHandle %p, RowCount %p)\n", StatementHandle, RowCount); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.StatementHandle = handle->unix_handle; - params.RowCount = &count; - if (SUCCESS((ret = ODBC_CALL( SQLRowCount, ¶ms ))) && RowCount) @@ -1264,7 +1273,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1221,18 +697,11 @@ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount) +@@ -1230,18 +697,11 @@ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount) SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -1285,27 +1294,27 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1241,17 +710,10 @@ SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut +@@ -1250,17 +710,10 @@ SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut */ SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value) { - struct SQLSetConnectOption_params params = { 0, Option, Value }; - struct handle *handle = ConnectionHandle; - SQLRETURN ret; -- -- TRACE("(ConnectionHandle %p, Option %d, Value %s)\n", ConnectionHandle, Option, debugstr_sqlulen(Value)); + SQLRETURN ret = SQL_ERROR; -- if (!handle) return SQL_INVALID_HANDLE; +- TRACE("(ConnectionHandle %p, Option %d, Value %s)\n", ConnectionHandle, Option, debugstr_sqlulen(Value)); + FIXME("(ConnectionHandle %p, Option %d, Value %s)\n", ConnectionHandle, Option, debugstr_sqlulen(Value)); +- if (!handle) return SQL_INVALID_HANDLE; +- - params.ConnectionHandle = handle->unix_handle; - ret = ODBC_CALL( SQLSetConnectOption, ¶ms ); - TRACE("Returning %d\n", ret); return ret; } -@@ -1260,18 +722,11 @@ SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti +@@ -1269,18 +722,11 @@ SQLRETURN WINAPI SQLSetConnectOption(SQLHDBC ConnectionHandle, SQLUSMALLINT Opti */ SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLSMALLINT NameLength) { @@ -1326,7 +1335,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1281,18 +736,11 @@ SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, +@@ -1290,18 +736,11 @@ SQLRETURN WINAPI SQLSetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName, SQLRETURN WINAPI SQLSetDescField(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength) { @@ -1347,7 +1356,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1303,26 +751,12 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, +@@ -1312,26 +751,12 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT SubType, SQLLEN Length, SQLSMALLINT Precision, SQLSMALLINT Scale, SQLPOINTER Data, SQLLEN *StringLength, SQLLEN *Indicator) { @@ -1376,7 +1385,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1332,16 +766,11 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, +@@ -1341,16 +766,11 @@ SQLRETURN WINAPI SQLSetDescRec(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLRETURN WINAPI SQLSetEnvAttr(SQLHENV EnvironmentHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -1395,7 +1404,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1352,76 +781,26 @@ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNum +@@ -1361,132 +781,26 @@ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNum SQLSMALLINT ParameterType, SQLULEN LengthPrecision, SQLSMALLINT ParameterScale, SQLPOINTER ParameterValue, SQLLEN *StrLen_or_Ind) { @@ -1425,20 +1434,76 @@ index d97837e5bca..89e4545f068 100644 - UINT i; - for (i = 0; i < handle->bind_col.count; i++) - { -- UINT8 *tmp = realloc( handle->bind_col.param[i].len, size * sizeof(UINT64) ); -- if (!tmp) return FALSE; +- UINT8 *tmp; +- if (!handle->bind_col.param[i].ptr) continue; +- if (!(tmp = realloc( handle->bind_col.param[i].len, size * sizeof(UINT64) ))) return FALSE; +- if (tmp != handle->bind_col.param[i].len) +- { +- struct SQLBindCol_params params; +- +- params.StatementHandle = handle->unix_handle; +- params.ColumnNumber = i + 1; +- params.TargetType = handle->bind_col.param[i].col.target_type; +- params.TargetValue = handle->bind_col.param[i].col.target_value; +- params.BufferLength = handle->bind_col.param[i].col.buffer_length; +- params.StrLen_or_Ind = tmp; +- if (!SUCCESS(ODBC_CALL( SQLBindCol, ¶ms ))) +- { +- free( tmp ); +- return FALSE; +- } +- } - handle->bind_col.param[i].len = tmp; - } - for (i = 0; i < handle->bind_param.count; i++) - { -- UINT8 *tmp = realloc( handle->bind_param.param[i].len, size * sizeof(UINT64) ); -- if (!tmp) return FALSE; +- UINT8 *tmp; +- if (!handle->bind_param.param[i].ptr) continue; +- if (!(tmp = realloc( handle->bind_param.param[i].len, size * sizeof(UINT64) ))) return FALSE; +- if (tmp != handle->bind_param.param[i].len) +- { +- struct SQLBindParam_params params; +- +- params.StatementHandle = handle->unix_handle; +- params.ParameterNumber = i + 1; +- params.ValueType = handle->bind_param.param[i].param.value_type; +- params.ParameterType = handle->bind_param.param[i].param.parameter_type; +- params.LengthPrecision = handle->bind_param.param[i].param.length_precision; +- params.ParameterScale = handle->bind_param.param[i].param.parameter_scale; +- params.ParameterValue = handle->bind_param.param[i].param.parameter_value; +- params.StrLen_or_Ind = tmp; +- if (!SUCCESS(ODBC_CALL( SQLBindParam, ¶ms ))) +- { +- free( tmp ); +- return FALSE; +- } +- } - handle->bind_param.param[i].len = tmp; - } - for (i = 0; i < handle->bind_parameter.count; i++) - { -- UINT8 *tmp = realloc( handle->bind_parameter.param[i].len, size * sizeof(UINT64) ); -- if (!tmp) return FALSE; +- UINT8 *tmp; +- if (!(tmp = realloc( handle->bind_parameter.param[i].len, size * sizeof(UINT64) ))) return FALSE; +- if (tmp != handle->bind_parameter.param[i].len) +- { +- struct SQLBindParameter_params params; +- +- params.StatementHandle = handle->unix_handle; +- params.ParameterNumber = i + 1; +- params.InputOutputType = handle->bind_parameter.param[i].parameter.input_output_type; +- params.ValueType = handle->bind_parameter.param[i].parameter.value_type; +- params.ParameterType = handle->bind_parameter.param[i].parameter.parameter_type; +- params.ColumnSize = handle->bind_parameter.param[i].parameter.column_size; +- params.DecimalDigits = handle->bind_parameter.param[i].parameter.decimal_digits; +- params.ParameterValue = handle->bind_parameter.param[i].parameter.parameter_value; +- params.BufferLength = handle->bind_parameter.param[i].parameter.buffer_length; +- params.StrLen_or_Ind = tmp; +- if (!SUCCESS(ODBC_CALL( SQLBindParameter, ¶ms ))) +- { +- free( tmp ); +- return FALSE; +- } +- } - handle->bind_parameter.param[i].len = tmp; - } - return TRUE; @@ -1476,7 +1541,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1430,17 +809,10 @@ SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -1495,17 +809,10 @@ SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, */ SQLRETURN WINAPI SQLSetStmtOption(SQLHSTMT StatementHandle, SQLUSMALLINT Option, SQLULEN Value) { @@ -1496,7 +1561,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1452,22 +824,14 @@ SQLRETURN WINAPI SQLSpecialColumns(SQLHSTMT StatementHandle, SQLUSMALLINT Identi +@@ -1517,22 +824,14 @@ SQLRETURN WINAPI SQLSpecialColumns(SQLHSTMT StatementHandle, SQLUSMALLINT Identi SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SQLUSMALLINT Nullable) { @@ -1521,7 +1586,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1478,22 +842,14 @@ SQLRETURN WINAPI SQLStatistics(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, S +@@ -1543,22 +842,14 @@ SQLRETURN WINAPI SQLStatistics(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, S SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved) { @@ -1546,7 +1611,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1504,23 +860,15 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM +@@ -1569,23 +860,15 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM SQLCHAR *SchemaName, SQLSMALLINT NameLength2, SQLCHAR *TableName, SQLSMALLINT NameLength3, SQLCHAR *TableType, SQLSMALLINT NameLength4) { @@ -1572,7 +1637,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1529,42 +877,27 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM +@@ -1594,42 +877,27 @@ SQLRETURN WINAPI SQLTables(SQLHSTMT StatementHandle, SQLCHAR *CatalogName, SQLSM */ SQLRETURN WINAPI SQLTransact(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLUSMALLINT CompletionType) { @@ -1624,7 +1689,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1573,149 +906,96 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectio +@@ -1638,149 +906,96 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectio */ SQLRETURN WINAPI SQLBulkOperations(SQLHSTMT StatementHandle, SQLSMALLINT Operation) { @@ -1817,7 +1882,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -1724,382 +1004,213 @@ SQLRETURN WINAPI SQLForeignKeys(SQLHSTMT StatementHandle, SQLCHAR *PkCatalogName +@@ -1789,389 +1004,213 @@ SQLRETURN WINAPI SQLForeignKeys(SQLHSTMT StatementHandle, SQLCHAR *PkCatalogName */ SQLRETURN WINAPI SQLMoreResults(SQLHSTMT StatementHandle) { @@ -2147,6 +2212,13 @@ index d97837e5bca..89e4545f068 100644 - return SQL_ERROR; - } - if (!alloc_binding( &handle->bind_parameter, InputOutputType, ParameterNumber, handle->row_count )) return SQL_ERROR; +- handle->bind_parameter.param[i].parameter.input_output_type = InputOutputType; +- handle->bind_parameter.param[i].parameter.value_type = ValueType; +- handle->bind_parameter.param[i].parameter.parameter_type = ParameterType; +- handle->bind_parameter.param[i].parameter.column_size = ColumnSize; +- handle->bind_parameter.param[i].parameter.decimal_digits = DecimalDigits; +- handle->bind_parameter.param[i].parameter.parameter_value = ParameterValue; +- handle->bind_parameter.param[i].parameter.buffer_length = BufferLength; + 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); @@ -2288,7 +2360,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2110,20 +1221,12 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, WCHAR *ServerName, SQLSMA +@@ -2182,20 +1221,12 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, WCHAR *ServerName, SQLSMA WCHAR *UserName, SQLSMALLINT NameLength2, WCHAR *Authentication, SQLSMALLINT NameLength3) { @@ -2311,7 +2383,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2134,36 +1237,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu +@@ -2206,36 +1237,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu SQLSMALLINT BufferLength, SQLSMALLINT *NameLength, SQLSMALLINT *DataType, SQLULEN *ColumnSize, SQLSMALLINT *DecimalDigits, SQLSMALLINT *Nullable) { @@ -2351,7 +2423,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2171,28 +1253,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu +@@ -2243,28 +1253,15 @@ SQLRETURN WINAPI SQLDescribeColW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu * SQLErrorW [ODBC32.110] */ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, SQLHSTMT StatementHandle, @@ -2384,7 +2456,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2201,18 +1270,11 @@ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, +@@ -2273,18 +1270,11 @@ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, */ SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLINTEGER TextLength) { @@ -2405,7 +2477,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2222,18 +1284,11 @@ SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *StatementText, +@@ -2294,18 +1284,11 @@ SQLRETURN WINAPI SQLExecDirectW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, SQLSMALLINT BufferLength, SQLSMALLINT *NameLength) { @@ -2426,7 +2498,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2242,18 +1297,11 @@ SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, +@@ -2314,18 +1297,11 @@ SQLRETURN WINAPI SQLGetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, */ SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQLINTEGER TextLength) { @@ -2447,7 +2519,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2262,18 +1310,11 @@ SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQL +@@ -2334,18 +1310,11 @@ SQLRETURN WINAPI SQLPrepareW(SQLHSTMT StatementHandle, WCHAR *StatementText, SQL */ SQLRETURN WINAPI SQLSetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName, SQLSMALLINT NameLength) { @@ -2468,7 +2540,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2285,30 +1326,12 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN +@@ -2357,30 +1326,12 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLLEN *NumericAttribute) { @@ -2501,7 +2573,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2318,18 +1341,11 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN +@@ -2390,18 +1341,11 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -2522,7 +2594,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2339,18 +1355,11 @@ SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu +@@ -2411,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) { @@ -2543,7 +2615,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2362,22 +1371,12 @@ SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber +@@ -2434,22 +1371,12 @@ SQLRETURN WINAPI SQLGetDescRecW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber SQLSMALLINT *SubType, SQLLEN *Length, SQLSMALLINT *Precision, SQLSMALLINT *Scale, SQLSMALLINT *Nullable) { @@ -2568,7 +2640,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2388,43 +1387,27 @@ SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLS +@@ -2460,43 +1387,27 @@ SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLS SQLSMALLINT DiagIdentifier, SQLPOINTER DiagInfo, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -2620,7 +2692,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2434,11 +1417,9 @@ SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA +@@ -2506,11 +1417,9 @@ SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER BufferLength, SQLINTEGER *StringLength) { @@ -2634,7 +2706,7 @@ index d97837e5bca..89e4545f068 100644 Attribute, Value, BufferLength, StringLength); if (!Value) -@@ -2447,11 +1428,6 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -2519,11 +1428,6 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, return SQL_ERROR; } @@ -2646,7 +2718,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2461,18 +1437,11 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -2533,18 +1437,11 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -2668,7 +2740,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2483,21 +1452,14 @@ SQLRETURN WINAPI SQLColumnsW(SQLHSTMT StatementHandle, WCHAR *CatalogName, SQLSM +@@ -2555,21 +1452,14 @@ SQLRETURN WINAPI SQLColumnsW(SQLHSTMT StatementHandle, WCHAR *CatalogName, SQLSM WCHAR *SchemaName, SQLSMALLINT NameLength2, WCHAR *TableName, SQLSMALLINT NameLength3, WCHAR *ColumnName, SQLSMALLINT NameLength4) { @@ -2693,7 +2765,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2508,21 +1470,13 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl +@@ -2580,21 +1470,13 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl SQLSMALLINT Length, WCHAR *OutConnectionString, SQLSMALLINT BufferLength, SQLSMALLINT *Length2, SQLUSMALLINT DriverCompletion) { @@ -2717,7 +2789,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2531,17 +1485,10 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl +@@ -2603,17 +1485,10 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl */ SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLPOINTER Value) { @@ -2737,7 +2809,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2551,18 +1498,11 @@ SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Opt +@@ -2623,18 +1498,11 @@ SQLRETURN WINAPI SQLGetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Opt SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQLPOINTER InfoValue, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength) { @@ -2758,7 +2830,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2571,17 +1511,10 @@ SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQ +@@ -2643,17 +1511,10 @@ SQLRETURN WINAPI SQLGetInfoW(SQLHDBC ConnectionHandle, SQLUSMALLINT InfoType, SQ */ SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType) { @@ -2778,7 +2850,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2590,17 +1523,10 @@ SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType) +@@ -2662,17 +1523,10 @@ SQLRETURN WINAPI SQLGetTypeInfoW(SQLHSTMT StatementHandle, SQLSMALLINT DataType) */ SQLRETURN WINAPI SQLSetConnectOptionW(SQLHDBC ConnectionHandle, SQLUSMALLINT Option, SQLULEN Value) { @@ -2798,7 +2870,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2612,21 +1538,13 @@ SQLRETURN WINAPI SQLSpecialColumnsW(SQLHSTMT StatementHandle, SQLUSMALLINT Ident +@@ -2684,21 +1538,13 @@ SQLRETURN WINAPI SQLSpecialColumnsW(SQLHSTMT StatementHandle, SQLUSMALLINT Ident SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Scope, SQLUSMALLINT Nullable) { @@ -2822,7 +2894,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2637,21 +1555,13 @@ SQLRETURN WINAPI SQLStatisticsW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, +@@ -2709,21 +1555,13 @@ SQLRETURN WINAPI SQLStatisticsW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLUSMALLINT Unique, SQLUSMALLINT Reserved) { @@ -2846,7 +2918,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2662,71 +1572,47 @@ SQLRETURN WINAPI SQLTablesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQL +@@ -2734,71 +1572,47 @@ SQLRETURN WINAPI SQLTablesW(SQLHSTMT StatementHandle, SQLWCHAR *CatalogName, SQL SQLWCHAR *SchemaName, SQLSMALLINT NameLength2, SQLWCHAR *TableName, SQLSMALLINT NameLength3, SQLWCHAR *TableType, SQLSMALLINT NameLength4) { @@ -2936,7 +3008,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2737,215 +1623,136 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi +@@ -2809,215 +1623,136 @@ SQLRETURN WINAPI SQLDataSourcesW(SQLHENV EnvironmentHandle, SQLUSMALLINT Directi SQLSMALLINT BufferLength1, SQLSMALLINT *NameLength1, WCHAR *Description, SQLSMALLINT BufferLength2, SQLSMALLINT *NameLength2) { @@ -3215,7 +3287,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2955,18 +1762,11 @@ SQLRETURN WINAPI SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, +@@ -3027,18 +1762,11 @@ SQLRETURN WINAPI SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT Direction, SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier, SQLPOINTER Value, SQLINTEGER BufferLength) { @@ -3236,7 +3308,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -2976,28 +1776,11 @@ SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumb +@@ -3048,28 +1776,11 @@ SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumb SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value, SQLINTEGER StringLength) { @@ -3268,7 +3340,7 @@ index d97837e5bca..89e4545f068 100644 return ret; } -@@ -3005,34 +1788,14 @@ SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, +@@ -3077,34 +1788,14 @@ SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, * SQLGetDiagRecA [ODBC32.236] */ SQLRETURN WINAPI SQLGetDiagRecA(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMALLINT RecNumber, diff --git a/patches/user32-rawinput-mouse/0001-server-Add-support-for-absolute-rawinput-mouse-messa.patch b/patches/user32-rawinput-mouse/0001-server-Add-support-for-absolute-rawinput-mouse-messa.patch index d71e72fe..1ac52650 100644 --- a/patches/user32-rawinput-mouse/0001-server-Add-support-for-absolute-rawinput-mouse-messa.patch +++ b/patches/user32-rawinput-mouse/0001-server-Add-support-for-absolute-rawinput-mouse-messa.patch @@ -1,17 +1,17 @@ -From 22d786152100f510a69cf9a2153638c47af7f017 Mon Sep 17 00:00:00 2001 +From f54dd14cd76979c7ada4b6aaa9869ae7ff741940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Fri, 8 Mar 2024 10:48:31 +0100 -Subject: [PATCH 1/7] server: Add support for absolute rawinput mouse messages. +Subject: [PATCH] server: Add support for absolute rawinput mouse messages. --- server/queue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/queue.c b/server/queue.c -index 0e8653bedf0..67c03c10b40 100644 +index 3e49897988f..cece12066fc 100644 --- a/server/queue.c +++ b/server/queue.c -@@ -1811,7 +1811,9 @@ static void rawmouse_init( struct rawinput *header, RAWMOUSE *rawmouse, int x, i +@@ -1859,7 +1859,9 @@ static void rawmouse_init( struct rawinput *header, RAWMOUSE *rawmouse, int x, i header->wparam = 0; header->usage = MAKELONG(HID_USAGE_GENERIC_MOUSE, HID_USAGE_PAGE_GENERIC); @@ -22,11 +22,11 @@ index 0e8653bedf0..67c03c10b40 100644 rawmouse->usButtonFlags = 0; rawmouse->usButtonData = 0; for (i = 1; i < ARRAY_SIZE(button_flags); ++i) -@@ -2044,7 +2046,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons +@@ -2098,7 +2100,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons raw_msg.time = time; raw_msg.message = WM_INPUT; raw_msg.flags = flags; -- rawmouse_init( &raw_msg.rawinput, &raw_msg.data.mouse, x - desktop->cursor.x, y - desktop->cursor.y, +- rawmouse_init( &raw_msg.rawinput, &raw_msg.data.mouse, x - desktop_shm->cursor.x, y - desktop_shm->cursor.y, + rawmouse_init( &raw_msg.rawinput, &raw_msg.data.mouse, input->mouse.x, input->mouse.y, raw_msg.flags, input->mouse.data, input->mouse.info ); diff --git a/patches/user32-rawinput-mouse/0004-server-Add-send_hardware_message-flags-for-rawinput-.patch b/patches/user32-rawinput-mouse/0004-server-Add-send_hardware_message-flags-for-rawinput-.patch index e38afaed..9a37af7e 100644 --- a/patches/user32-rawinput-mouse/0004-server-Add-send_hardware_message-flags-for-rawinput-.patch +++ b/patches/user32-rawinput-mouse/0004-server-Add-send_hardware_message-flags-for-rawinput-.patch @@ -1,4 +1,4 @@ -From e51d13c759303fd7a903d784ebf8e9a42e2955b6 Mon Sep 17 00:00:00 2001 +From 0dae85eba564b06274760c085652908727e3b2e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Mon, 26 Aug 2019 14:37:20 +0200 Subject: [PATCH] server: Add send_hardware_message flags for rawinput @@ -11,10 +11,10 @@ Subject: [PATCH] server: Add send_hardware_message flags for rawinput 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/include/ntuser.h b/include/ntuser.h -index 507ed2e47ec..33e99f1084e 100644 +index bd11567290f..c75e691b4ee 100644 --- a/include/ntuser.h +++ b/include/ntuser.h -@@ -1478,6 +1478,10 @@ struct hid_packet +@@ -1480,6 +1480,10 @@ struct hid_packet C_ASSERT(sizeof(struct hid_packet) == offsetof(struct hid_packet, data[0])); @@ -26,10 +26,10 @@ index 507ed2e47ec..33e99f1084e 100644 { UINT flags; diff --git a/server/protocol.def b/server/protocol.def -index c3fab5e65ba..fc686f1254e 100644 +index dc77ecec15b..e4e632dcf23 100644 --- a/server/protocol.def +++ b/server/protocol.def -@@ -2164,7 +2164,7 @@ enum message_type +@@ -2206,7 +2206,7 @@ enum message_type @REQ(send_hardware_message) user_handle_t win; /* window handle */ hw_input_t input; /* input data */ @@ -38,7 +38,7 @@ index c3fab5e65ba..fc686f1254e 100644 VARARG(report,bytes); /* HID report data */ @REPLY int wait; /* do we need to wait for a reply? */ -@@ -2173,7 +2173,6 @@ enum message_type +@@ -2215,7 +2215,6 @@ enum message_type int new_x; /* new cursor position */ int new_y; @END @@ -47,20 +47,20 @@ index c3fab5e65ba..fc686f1254e 100644 /* Get a message from the current queue */ diff --git a/server/queue.c b/server/queue.c -index 7a721877a6f..a220baa1f92 100644 +index cece12066fc..c423b9ad8c4 100644 --- a/server/queue.c +++ b/server/queue.c -@@ -2020,7 +2020,7 @@ static void dispatch_rawinput_message( struct desktop *desktop, struct rawinput_ +@@ -2031,7 +2031,7 @@ static void dispatch_rawinput_message( struct desktop *desktop, struct rawinput_ /* queue a hardware message for a mouse event */ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input, - unsigned int origin, struct msg_queue *sender ) + unsigned int origin, struct msg_queue *sender, unsigned int send_flags ) { + const desktop_shm_t *desktop_shm = desktop->shared; struct hardware_msg_data *msg_data; - struct rawinput_message raw_msg; -@@ -2075,7 +2075,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons - y = desktop->cursor.y; +@@ -2092,7 +2092,7 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons + y = desktop_shm->cursor.y; } - if ((foreground = get_foreground_thread( desktop, win ))) @@ -68,7 +68,7 @@ index 7a721877a6f..a220baa1f92 100644 { memset( &raw_msg, 0, sizeof(raw_msg) ); raw_msg.foreground = foreground; -@@ -2090,6 +2090,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons +@@ -2107,6 +2107,8 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons release_object( foreground ); } @@ -77,7 +77,7 @@ index 7a721877a6f..a220baa1f92 100644 for (i = 0; i < ARRAY_SIZE( messages ); i++) { if (!messages[i]) continue; -@@ -2120,14 +2122,14 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons +@@ -2137,14 +2139,14 @@ static int queue_mouse_message( struct desktop *desktop, user_handle_t win, cons } static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input, @@ -94,7 +94,7 @@ index 7a721877a6f..a220baa1f92 100644 } static void stop_key_repeat( struct desktop *desktop ) -@@ -2140,7 +2142,7 @@ static void stop_key_repeat( struct desktop *desktop ) +@@ -2157,7 +2159,7 @@ static void stop_key_repeat( struct desktop *desktop ) /* queue a hardware message for a keyboard event */ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, const hw_input_t *input, @@ -103,7 +103,7 @@ index 7a721877a6f..a220baa1f92 100644 { struct hw_msg_source source = { IMDT_KEYBOARD, origin }; struct hardware_msg_data *msg_data; -@@ -2263,7 +2265,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c +@@ -2280,7 +2282,7 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c } } @@ -112,7 +112,7 @@ index 7a721877a6f..a220baa1f92 100644 { struct rawinput_message raw_msg = {0}; raw_msg.foreground = foreground; -@@ -2278,6 +2280,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c +@@ -2295,6 +2297,8 @@ static int queue_keyboard_message( struct desktop *desktop, user_handle_t win, c release_object( foreground ); } @@ -121,7 +121,7 @@ index 7a721877a6f..a220baa1f92 100644 if (!(msg = alloc_hardware_message( input->kbd.info, source, time, 0 ))) return 0; msg_data = msg->data; -@@ -3029,10 +3033,10 @@ DECL_HANDLER(send_hardware_message) +@@ -3050,10 +3054,10 @@ DECL_HANDLER(send_hardware_message) switch (req->input.type) { case INPUT_MOUSE: diff --git a/staging/upstream-commit b/staging/upstream-commit index a1228bfb..b2bb92b1 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -96d294aa123497d3c5b0611d9de4787e3eb7fc6a +8c64979dcb2673659adacf39733e24d42b7fc01d