You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
92374493ee | ||
|
a713da9181 | ||
|
75f3eede59 | ||
|
a7f29f1236 | ||
|
1143543d4a | ||
|
4cfe8f056a | ||
|
c23ee1bf3b | ||
|
d2636c432f | ||
|
7624463e7c | ||
|
06d80381a4 |
@@ -0,0 +1,29 @@
|
||||
From 434df65f9023ec64c175825e5b38cd9daf744565 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Aida=20Jonikien=C4=97?= <aidas957@gmail.com>
|
||||
Date: Sat, 10 Aug 2024 22:20:30 +0300
|
||||
Subject: [PATCH] dinput: Use the correct array index in
|
||||
keyboard_create_device().
|
||||
|
||||
This fixes a segfault when launching NFS Underground.
|
||||
|
||||
Fixes: f434ea12b83 ("dinput: Implement DIPROP_SCANCODE.")
|
||||
---
|
||||
dlls/dinput/keyboard.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c
|
||||
index a83f825e97d..aee1d996dde 100644
|
||||
--- a/dlls/dinput/keyboard.c
|
||||
+++ b/dlls/dinput/keyboard.c
|
||||
@@ -211,7 +211,7 @@ HRESULT keyboard_create_device( struct dinput *dinput, const GUID *guid, IDirect
|
||||
|
||||
if (FAILED(hr = dinput_device_init_device_format( &impl->base.IDirectInputDevice8W_iface ))) goto failed;
|
||||
|
||||
- for (i = 0, index = 0; i < 512; ++i)
|
||||
+ for (i = 0, index = 0; i < impl->base.device_format.dwNumObjs; ++i)
|
||||
{
|
||||
if (!GetKeyNameTextW( i << 16, instance.tszName, ARRAY_SIZE(instance.tszName) )) continue;
|
||||
if (!(dik = map_dik_code( i, 0, subtype, impl->base.dinput->dwVersion ))) continue;
|
||||
--
|
||||
2.43.0
|
||||
|
5
patches/dinput-regression-fix/definition
Normal file
5
patches/dinput-regression-fix/definition
Normal file
@@ -0,0 +1,5 @@
|
||||
Fixes: Fix crash in NFS Underground
|
||||
#Depends: dinput-joy-mappings
|
||||
Depends: dinput-scancode
|
||||
|
||||
# PR 6249
|
@@ -1,4 +1,4 @@
|
||||
From f0ff0cdc5472deafb8c75f3d0d6456ddb4164878 Mon Sep 17 00:00:00 2001
|
||||
From 4865ed639a87ee06ffcf6a7a74b6c97ef448e7ab Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 12:34:42 -0500
|
||||
Subject: [PATCH] ntdll: Implement NtWaitForMultipleObjects().
|
||||
@@ -10,20 +10,20 @@ Subject: [PATCH] ntdll: Implement NtWaitForMultipleObjects().
|
||||
3 files changed, 182 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index e031e9cb94f..f383221194c 100644
|
||||
index e031e9cb94f..85db837f16b 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -22,6 +22,10 @@
|
||||
#pragma makedep unix
|
||||
#endif
|
||||
@@ -24,6 +24,10 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
+#ifndef _GNU_SOURCE
|
||||
+#define _GNU_SOURCE
|
||||
+#endif
|
||||
+
|
||||
#include "config.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@@ -34,6 +38,12 @@
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
@@ -221,10 +221,10 @@ index c63491dcaad..92b609ebd27 100644
|
||||
/* We have to synchronize on the fd cache mutex so that our calls to receive_fd
|
||||
* don't race with theirs. It looks weird, I know.
|
||||
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c
|
||||
index 76da038649f..1c60cd11f77 100644
|
||||
index dd938c95873..4361813e628 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -1524,6 +1524,13 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, BO
|
||||
@@ -1588,6 +1588,13 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, BO
|
||||
|
||||
if (!count || count > MAXIMUM_WAIT_OBJECTS) return STATUS_INVALID_PARAMETER_1;
|
||||
|
||||
|
@@ -1,82 +1,42 @@
|
||||
From 56d18e7bd712c917f91e837918491def4b0f587d Mon Sep 17 00:00:00 2001
|
||||
From 49adfd79f730714b11c4d5f983ced05b26ffa52a Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 13:42:26 +1000
|
||||
Subject: [PATCH 01/15] odbc32: Support freeing SQL handles for ODBC v2
|
||||
drivers.
|
||||
Subject: [PATCH] odbc32: Support freeing SQL handles for ODBC v2 drivers.
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 37 ++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 34 insertions(+), 3 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index b71ef7aac42..2a38197b243 100644
|
||||
index 4799ca0a11e..678d9260fbb 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -1401,6 +1401,37 @@ SQLRETURN WINAPI SQLFetchScroll(SQLHSTMT StatementHandle, SQLSMALLINT FetchOrien
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static SQLRETURN freehandle_win32(struct handle *handle, SQLSMALLINT type, SQLUSMALLINT option)
|
||||
+{
|
||||
+ SQLRETURN ret = SQL_ERROR;
|
||||
+
|
||||
+ if (handle->win32_funcs->SQLFreeHandle)
|
||||
+ {
|
||||
+ ret = handle->win32_funcs->SQLFreeHandle( type, handle->win32_handle );
|
||||
+ }
|
||||
@@ -1867,6 +1867,25 @@ static SQLRETURN free_handle_win32( SQLSMALLINT type, struct handle *handle )
|
||||
{
|
||||
if (handle->win32_funcs->SQLFreeHandle)
|
||||
return handle->win32_funcs->SQLFreeHandle( type, handle->win32_handle );
|
||||
+ else
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ if (type == SQL_HANDLE_ENV)
|
||||
+ {
|
||||
+ if (handle->win32_funcs->SQLFreeEnv)
|
||||
+ ret = handle->win32_funcs->SQLFreeEnv( handle->win32_handle );
|
||||
+ return handle->win32_funcs->SQLFreeEnv( handle->win32_handle );
|
||||
+ }
|
||||
+ else if (type == SQL_HANDLE_DBC)
|
||||
+ {
|
||||
+ if (handle->win32_funcs->SQLFreeConnect)
|
||||
+ ret = handle->win32_funcs->SQLFreeConnect( handle->win32_handle );
|
||||
+ return handle->win32_funcs->SQLFreeConnect( handle->win32_handle );
|
||||
+ }
|
||||
+ else if (type == SQL_HANDLE_STMT)
|
||||
+ {
|
||||
+ if (handle->win32_funcs->SQLFreeStmt)
|
||||
+ ret = handle->win32_funcs->SQLFreeStmt( handle->win32_handle, option );
|
||||
+ return handle->win32_funcs->SQLFreeStmt( handle->win32_handle, SQL_CLOSE );
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/*************************************************************************
|
||||
* SQLFreeConnect [ODBC32.014]
|
||||
*/
|
||||
@@ -1420,7 +1451,7 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle)
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLFreeHandle( SQL_HANDLE_DBC, handle->win32_handle );
|
||||
+ ret = freehandle_win32( handle, SQL_HANDLE_DBC, 0 );
|
||||
}
|
||||
return SQL_ERROR;
|
||||
}
|
||||
|
||||
free( handle );
|
||||
@@ -1447,7 +1478,7 @@ SQLRETURN WINAPI SQLFreeEnv(SQLHENV EnvironmentHandle)
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLFreeHandle( SQL_HANDLE_ENV, handle->win32_handle );
|
||||
+ ret = freehandle_win32( handle, SQL_HANDLE_ENV, 0 );
|
||||
}
|
||||
|
||||
RegCloseKey( handle->drivers_key );
|
||||
@@ -1497,7 +1528,7 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLFreeHandle( HandleType, handle->win32_handle );
|
||||
+ ret = freehandle_win32( handle, HandleType, 0 );
|
||||
}
|
||||
|
||||
RegCloseKey( handle->drivers_key );
|
||||
--
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
From dc6b1e2572c7210ece06a3a9665738d3f811b4ba Mon Sep 17 00:00:00 2001
|
||||
From 1966db0e2fe8ee752a7a59b970749235b3fa0e20 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 18 Jul 2024 14:17:44 +1000
|
||||
Subject: [PATCH 02/15] odbc32: SQLSetEnvAttr isnt supported in ODBC v2.0
|
||||
Subject: [PATCH] odbc32: SQLSetEnvAttr isnt supported in ODBC v2.0
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 2a38197b243..741555f6582 100644
|
||||
index 6e51693e33c..0703e2f580d 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -839,7 +839,7 @@ static int has_suffix( const WCHAR *str, const WCHAR *suffix )
|
||||
@@ -1010,7 +1010,7 @@ static int has_suffix( const WCHAR *str, const WCHAR *suffix )
|
||||
|
||||
static SQLRETURN set_env_attr( struct handle *handle, SQLINTEGER attr, SQLPOINTER value, SQLINTEGER len )
|
||||
{
|
||||
@@ -20,7 +20,7 @@ index 2a38197b243..741555f6582 100644
|
||||
|
||||
if (handle->unix_handle)
|
||||
{
|
||||
@@ -848,7 +848,8 @@ static SQLRETURN set_env_attr( struct handle *handle, SQLINTEGER attr, SQLPOINTE
|
||||
@@ -1019,7 +1019,8 @@ static SQLRETURN set_env_attr( struct handle *handle, SQLINTEGER attr, SQLPOINTE
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
|
@@ -1,98 +1,68 @@
|
||||
From de93b39154c4d964036d4fac9854bb4593a894a0 Mon Sep 17 00:00:00 2001
|
||||
From c6edaf28df9e495ff173910c6e0124d244784f41 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 18 Jul 2024 14:34:49 +1000
|
||||
Subject: [PATCH 03/15] odbc32: Support Allocating SQL handles for ODBC v2
|
||||
drivers.
|
||||
Subject: [PATCH] odbc32: Support Allocating SQL handles for ODBC v2 drivers.
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 42 ++++++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 37 insertions(+), 5 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 31 +++++++++++++++++++++++++------
|
||||
1 file changed, 25 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 741555f6582..e8e08fb7d00 100644
|
||||
index 6fe38e7a863..6168786084d 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -410,6 +410,38 @@ SQLRETURN WINAPI SQLAllocEnv(SQLHENV *EnvironmentHandle)
|
||||
return ret;
|
||||
}
|
||||
@@ -439,13 +439,32 @@ static SQLRETURN alloc_handle_unix( SQLSMALLINT type, struct handle *input, stru
|
||||
|
||||
+static SQLRETURN allochandle_win32(struct handle *handle, SQLSMALLINT type, SQLHANDLE InputHandle, SQLHANDLE *OutputHandle)
|
||||
+{
|
||||
static SQLRETURN alloc_handle_win32( SQLSMALLINT type, struct handle *input, struct handle *output )
|
||||
{
|
||||
+ SQLRETURN ret = SQL_ERROR;
|
||||
+
|
||||
+ if (handle->win32_funcs->SQLAllocHandle)
|
||||
+ {
|
||||
+ if ((ret = handle->win32_funcs->SQLAllocHandle( type, InputHandle, OutputHandle )))
|
||||
+ return ret;
|
||||
+ }
|
||||
if (input->win32_funcs->SQLAllocHandle)
|
||||
{
|
||||
- SQLRETURN ret = input->win32_funcs->SQLAllocHandle( type, input->win32_handle, &output->win32_handle );
|
||||
- if (SUCCESS( ret )) output->win32_funcs = input->win32_funcs;
|
||||
- return ret;
|
||||
+ ret = input->win32_funcs->SQLAllocHandle( type, input->win32_handle, &output->win32_handle );
|
||||
}
|
||||
- return SQL_ERROR;
|
||||
+ else
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ if (type == SQL_HANDLE_ENV)
|
||||
+ {
|
||||
+ if (handle->win32_funcs->SQLAllocEnv)
|
||||
+ ret = handle->win32_funcs->SQLAllocEnv( OutputHandle );
|
||||
+ if (input->win32_funcs->SQLAllocEnv)
|
||||
+ ret = input->win32_funcs->SQLAllocEnv( &output->win32_handle );
|
||||
+ }
|
||||
+ else if (type == SQL_HANDLE_DBC)
|
||||
+ {
|
||||
+ if (handle->win32_funcs->SQLAllocConnect)
|
||||
+ ret = handle->win32_funcs->SQLAllocConnect( InputHandle, OutputHandle );
|
||||
+ if (input->win32_funcs->SQLAllocConnect)
|
||||
+ ret = input->win32_funcs->SQLAllocConnect( input, &output->win32_handle );
|
||||
+ }
|
||||
+ else if (type == SQL_HANDLE_STMT)
|
||||
+ {
|
||||
+ if (handle->win32_funcs->SQLAllocStmt)
|
||||
+ ret = handle->win32_funcs->SQLAllocStmt( InputHandle, OutputHandle );
|
||||
+ if (input->win32_funcs->SQLAllocStmt)
|
||||
+ ret = input->win32_funcs->SQLAllocStmt( input, &output->win32_handle );
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (SUCCESS( ret )) output->win32_funcs = input->win32_funcs;
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SQLAllocHandle [ODBC32.024]
|
||||
*/
|
||||
@@ -438,7 +470,7 @@ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, S
|
||||
}
|
||||
else if (input->win32_handle)
|
||||
{
|
||||
- ret = input->win32_funcs->SQLAllocHandle( HandleType, input->win32_handle, &output->win32_handle );
|
||||
+ ret = allochandle_win32(input, HandleType, input->win32_handle, &output->win32_handle);
|
||||
if (SUCCESS( ret )) output->win32_funcs = input->win32_funcs;
|
||||
}
|
||||
|
||||
@@ -469,7 +501,7 @@ SQLRETURN WINAPI SQLAllocStmt(SQLHDBC ConnectionHandle, SQLHSTMT *StatementHandl
|
||||
}
|
||||
else if (con->win32_handle)
|
||||
{
|
||||
- ret = con->win32_funcs->SQLAllocStmt( con->win32_handle, &stmt->win32_handle );
|
||||
+ ret = allochandle_win32(con, SQL_HANDLE_STMT, con->win32_handle, &stmt->win32_handle );
|
||||
if (SUCCESS( ret )) stmt->win32_funcs = con->win32_funcs;
|
||||
}
|
||||
|
||||
@@ -508,7 +540,7 @@ SQLRETURN WINAPI SQLAllocHandleStd(SQLSMALLINT HandleType, SQLHANDLE InputHandle
|
||||
}
|
||||
else if (input->win32_handle)
|
||||
{
|
||||
- ret = input->win32_funcs->SQLAllocHandleStd( HandleType, input->win32_handle, &output->win32_handle );
|
||||
+ ret = allochandle_win32(input, HandleType, input->win32_handle, &output->win32_handle);
|
||||
if (SUCCESS( ret )) output->win32_funcs = input->win32_funcs;
|
||||
}
|
||||
|
||||
@@ -874,7 +906,7 @@ static SQLRETURN create_env( struct handle *handle, BOOL is_unix )
|
||||
@@ -1045,7 +1064,7 @@ static SQLRETURN create_env( struct handle *handle, BOOL is_unix )
|
||||
}
|
||||
else
|
||||
{
|
||||
- if ((ret = handle->win32_funcs->SQLAllocHandle( SQL_HANDLE_ENV, NULL, &handle->win32_handle ))) return ret;
|
||||
+ if ((ret = allochandle_win32(handle, SQL_HANDLE_ENV, NULL, &handle->win32_handle ))) return ret;
|
||||
+ if ((ret = alloc_handle_win32(SQL_HANDLE_ENV, handle, handle ))) return ret;
|
||||
}
|
||||
|
||||
return prepare_env( handle );
|
||||
@@ -930,7 +962,7 @@ static SQLRETURN create_con( struct handle *handle )
|
||||
@@ -1101,7 +1120,7 @@ static SQLRETURN create_con( struct handle *handle )
|
||||
}
|
||||
else
|
||||
{
|
||||
- if ((ret = handle->win32_funcs->SQLAllocHandle( SQL_HANDLE_DBC, parent->win32_handle, &handle->win32_handle )))
|
||||
+ if ((ret = allochandle_win32(handle, SQL_HANDLE_DBC, parent->win32_handle, &handle->win32_handle )))
|
||||
+ if ((ret = alloc_handle_win32(SQL_HANDLE_DBC, parent, handle )))
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 9eb47396d1a2f5a9a5fe275a92a75ae6a1bbabec Mon Sep 17 00:00:00 2001
|
||||
From 652327cf649f9d10794f18d6c3a2c3452f42f947 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:13:33 +1000
|
||||
Subject: [PATCH] odbc32: Support Driver in connection string
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] odbc32: Support Driver in connection string
|
||||
1 file changed, 75 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 54e0800128e..7c00cece863 100644
|
||||
index 94504a8cc26..df8fa06dc57 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -900,23 +900,28 @@ static HKEY open_odbcinst_key( void )
|
||||
@@ -989,23 +989,28 @@ static HKEY open_odbcinst_key( void )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ index 54e0800128e..7c00cece863 100644
|
||||
|
||||
if (!(key_odbcinst = open_odbcinst_key()) || RegOpenKeyExW( key_odbcinst, driver_name, 0, KEY_READ, &key_driver ))
|
||||
{
|
||||
@@ -1086,7 +1091,7 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM
|
||||
@@ -1175,7 +1180,7 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
@@ -56,7 +56,7 @@ index 54e0800128e..7c00cece863 100644
|
||||
{
|
||||
WARN( "can't find driver filename\n" );
|
||||
goto done;
|
||||
@@ -2984,6 +2989,35 @@ static SQLRETURN browse_connect_unix_a( struct handle *handle, SQLCHAR *in_conn_
|
||||
@@ -3983,6 +3988,35 @@ static SQLRETURN browse_connect_unix_a( struct handle *handle, SQLCHAR *in_conn_
|
||||
return ODBC_CALL( SQLBrowseConnect, ¶ms );
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ index 54e0800128e..7c00cece863 100644
|
||||
/*************************************************************************
|
||||
* SQLBrowseConnect [ODBC32.055]
|
||||
*/
|
||||
@@ -2993,6 +3027,7 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectio
|
||||
@@ -3992,6 +4026,7 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectio
|
||||
struct handle *handle = ConnectionHandle;
|
||||
WCHAR *datasource = NULL, *filename = NULL, *connection_string = strdupAW( (const char *)InConnectionString );
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
@@ -100,7 +100,7 @@ index 54e0800128e..7c00cece863 100644
|
||||
|
||||
TRACE("(ConnectionHandle %p, InConnectionString %s, StringLength1 %d, OutConnectionString %p, BufferLength, %d, "
|
||||
"StringLength2 %p)\n", ConnectionHandle, debugstr_sqlstr(InConnectionString, StringLength1),
|
||||
@@ -3000,13 +3035,16 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectio
|
||||
@@ -3999,13 +4034,16 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectio
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
@@ -121,7 +121,7 @@ index 54e0800128e..7c00cece863 100644
|
||||
{
|
||||
WARN( "can't find driver filename\n" );
|
||||
goto done;
|
||||
@@ -3809,6 +3847,7 @@ SQLRETURN WINAPI SQLDriverConnect(SQLHDBC ConnectionHandle, SQLHWND WindowHandle
|
||||
@@ -5083,6 +5121,7 @@ SQLRETURN WINAPI SQLDriverConnect(SQLHDBC ConnectionHandle, SQLHWND WindowHandle
|
||||
struct handle *handle = ConnectionHandle;
|
||||
WCHAR *datasource = NULL, *filename = NULL, *connection_string = strdupAW( (const char *)InConnectionString );
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
@@ -129,7 +129,7 @@ index 54e0800128e..7c00cece863 100644
|
||||
|
||||
TRACE("(ConnectionHandle %p, WindowHandle %p, InConnectionString %s, Length %d, OutConnectionString %p,"
|
||||
" BufferLength %d, Length2 %p, DriverCompletion %d)\n", ConnectionHandle, WindowHandle,
|
||||
@@ -3817,13 +3856,16 @@ SQLRETURN WINAPI SQLDriverConnect(SQLHDBC ConnectionHandle, SQLHWND WindowHandle
|
||||
@@ -5091,13 +5130,16 @@ SQLRETURN WINAPI SQLDriverConnect(SQLHDBC ConnectionHandle, SQLHWND WindowHandle
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
@@ -150,7 +150,7 @@ index 54e0800128e..7c00cece863 100644
|
||||
{
|
||||
WARN( "can't find driver filename\n" );
|
||||
goto done;
|
||||
@@ -4022,7 +4064,7 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, WCHAR *ServerName, SQLSMA
|
||||
@@ -5310,7 +5352,7 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, SQLWCHAR *ServerName, SQL
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
@@ -159,7 +159,7 @@ index 54e0800128e..7c00cece863 100644
|
||||
{
|
||||
WARN( "can't find driver filename\n" );
|
||||
goto done;
|
||||
@@ -4714,6 +4756,7 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
||||
@@ -6137,6 +6179,7 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
||||
struct handle *handle = ConnectionHandle;
|
||||
WCHAR *datasource, *filename = NULL;
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
@@ -167,7 +167,7 @@ index 54e0800128e..7c00cece863 100644
|
||||
|
||||
TRACE("(ConnectionHandle %p, WindowHandle %p, InConnectionString %s, Length %d, OutConnectionString %p,"
|
||||
" BufferLength %d, Length2 %p, DriverCompletion %d)\n", ConnectionHandle, WindowHandle,
|
||||
@@ -4722,13 +4765,16 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
||||
@@ -6145,13 +6188,16 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
@@ -188,7 +188,7 @@ index 54e0800128e..7c00cece863 100644
|
||||
{
|
||||
WARN( "can't find driver filename\n" );
|
||||
goto done;
|
||||
@@ -5020,6 +5066,7 @@ SQLRETURN WINAPI SQLBrowseConnectW(SQLHDBC ConnectionHandle, SQLWCHAR *InConnect
|
||||
@@ -6553,6 +6599,7 @@ SQLRETURN WINAPI SQLBrowseConnectW(SQLHDBC ConnectionHandle, SQLWCHAR *InConnect
|
||||
struct handle *handle = ConnectionHandle;
|
||||
WCHAR *datasource, *filename = NULL;
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
@@ -196,7 +196,7 @@ index 54e0800128e..7c00cece863 100644
|
||||
|
||||
TRACE("(ConnectionHandle %p, InConnectionString %s, StringLength1 %d, OutConnectionString %p, BufferLength %d, "
|
||||
"StringLength2 %p)\n", ConnectionHandle, debugstr_sqlwstr(InConnectionString, StringLength1), StringLength1,
|
||||
@@ -5027,13 +5074,16 @@ SQLRETURN WINAPI SQLBrowseConnectW(SQLHDBC ConnectionHandle, SQLWCHAR *InConnect
|
||||
@@ -6560,13 +6607,16 @@ SQLRETURN WINAPI SQLBrowseConnectW(SQLHDBC ConnectionHandle, SQLWCHAR *InConnect
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
From c036cbda4e49b15e0a8dea55bb346929db5ce6c2 Mon Sep 17 00:00:00 2001
|
||||
From 6316f79675f38230ee43da7d8a993ff9cb1379f3 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:19:22 +1000
|
||||
Subject: [PATCH 05/15] odbc32: SQLColAttributeW support fallback function
|
||||
Subject: [PATCH] odbc32: SQLColAttributeW support fallback function
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 23 +++++++++++++++++++++++
|
||||
1 file changed, 23 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 511fd8c9de3..1f51ac2a27e 100644
|
||||
index df8fa06dc57..cbe3e72ef35 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -4060,6 +4060,21 @@ static SQLRETURN col_attribute_unix_w( struct handle *handle, SQLUSMALLINT col,
|
||||
@@ -5686,6 +5686,21 @@ static SQLRETURN col_attribute_unix_w( struct handle *handle, SQLUSMALLINT col,
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ index 511fd8c9de3..1f51ac2a27e 100644
|
||||
static SQLRETURN col_attribute_win32_w( struct handle *handle, SQLUSMALLINT col, SQLUSMALLINT field_id,
|
||||
SQLPOINTER char_attr, SQLSMALLINT buflen, SQLSMALLINT *retlen,
|
||||
SQLLEN *num_attr )
|
||||
@@ -4067,6 +4082,14 @@ static SQLRETURN col_attribute_win32_w( struct handle *handle, SQLUSMALLINT col,
|
||||
@@ -5693,6 +5708,14 @@ static SQLRETURN col_attribute_win32_w( struct handle *handle, SQLUSMALLINT col,
|
||||
if (handle->win32_funcs->SQLColAttributeW)
|
||||
return handle->win32_funcs->SQLColAttributeW( handle->win32_handle, col, field_id, char_attr, buflen,
|
||||
retlen, num_attr );
|
||||
|
@@ -1,52 +1,45 @@
|
||||
From d3e972d613def74c2b59757ca25653303cb652bf Mon Sep 17 00:00:00 2001
|
||||
From 83238653f67745cd9316b6140fc32a424ffa9b1b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:40:32 +1000
|
||||
Subject: [PATCH 08/15] odbc32: SQLBindParameter handle fallback function
|
||||
Subject: [PATCH] odbc32: SQLBindParameter handle fallback function
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 27 ++++++++++++++++++++++++++-
|
||||
1 file changed, 26 insertions(+), 1 deletion(-)
|
||||
dlls/odbc32/proxyodbc.c | 22 ++++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 6eb15687f92..462661f43de 100644
|
||||
index 557cd212425..7105f3534ce 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -3570,9 +3570,34 @@ SQLRETURN WINAPI SQLBindParameter(SQLHSTMT StatementHandle, SQLUSMALLINT Paramet
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLBindParameter( handle->win32_handle, ParameterNumber, InputOutputType, ValueType,
|
||||
+ if (handle->win32_funcs->SQLBindParameter)
|
||||
+ {
|
||||
+ ret = handle->win32_funcs->SQLBindParameter( handle->win32_handle, ParameterNumber, InputOutputType, ValueType,
|
||||
ParameterType, ColumnSize, DecimalDigits, ParameterValue,
|
||||
BufferLength, StrLen_or_Ind );
|
||||
+ }
|
||||
+ else if(handle->win32_funcs->SQLBindParam)
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ /* TODO: Make function */
|
||||
+ if(ValueType == SQL_C_TYPE_TIME)
|
||||
+ ValueType = SQL_C_TIME;
|
||||
+ else if(ValueType == SQL_C_TYPE_DATE)
|
||||
+ ValueType = SQL_C_DATE;
|
||||
+ else if(ValueType == SQL_C_TYPE_TIMESTAMP)
|
||||
+ ValueType = SQL_C_TIMESTAMP;
|
||||
@@ -5052,6 +5052,28 @@ static SQLRETURN bind_parameter_win32( struct handle *handle, SQLUSMALLINT param
|
||||
if (handle->win32_funcs->SQLBindParameter)
|
||||
return handle->win32_funcs->SQLBindParameter( handle->win32_handle, param, io_type, value_type, param_type,
|
||||
size, digits, value, buflen, len );
|
||||
+ else if(handle->win32_funcs->SQLBindParam)
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ /* TODO: Make function */
|
||||
+ if (value_type == SQL_C_TYPE_TIME)
|
||||
+ value_type = SQL_C_TIME;
|
||||
+ else if (value_type == SQL_C_TYPE_DATE)
|
||||
+ value_type = SQL_C_DATE;
|
||||
+ else if (value_type == SQL_C_TYPE_TIMESTAMP)
|
||||
+ value_type = SQL_C_TIMESTAMP;
|
||||
+
|
||||
+ /* TODO: Make function */
|
||||
+ if (ParameterType == SQL_TIME)
|
||||
+ ParameterType = SQL_TYPE_TIME;
|
||||
+ else if (ParameterType == SQL_DATE)
|
||||
+ ParameterType = SQL_TYPE_DATE;
|
||||
+ else if (ParameterType == SQL_TIMESTAMP)
|
||||
+ ParameterType = SQL_TYPE_TIMESTAMP;;;
|
||||
+ /* TODO: Make function */
|
||||
+ if (param_type == SQL_TIME)
|
||||
+ param_type = SQL_TYPE_TIME;
|
||||
+ else if (param_type == SQL_DATE)
|
||||
+ param_type = SQL_TYPE_DATE;
|
||||
+ else if (param_type == SQL_TIMESTAMP)
|
||||
+ param_type = SQL_TYPE_TIMESTAMP;;;
|
||||
+
|
||||
+ ret = handle->win32_funcs->SQLBindParam(handle->win32_handle, ParameterNumber, ValueType, ParameterType,
|
||||
+ ColumnSize, DecimalDigits, ParameterValue, StrLen_or_Ind);
|
||||
+ }
|
||||
}
|
||||
+ return handle->win32_funcs->SQLBindParam(handle->win32_handle, param, value_type, param_type,
|
||||
+ size, digits, value, len);
|
||||
+ }
|
||||
return SQL_ERROR;
|
||||
}
|
||||
|
||||
TRACE("Returning %d\n", ret);
|
||||
--
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,46 +1,28 @@
|
||||
From 20bf2dea9241d387c9415d816ea96e1947d8a710 Mon Sep 17 00:00:00 2001
|
||||
From 20374d93364244b20dc9c87b53c40c375d4f1235 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:55:47 +1000
|
||||
Subject: [PATCH 09/15] odbc32: SQLSetConnectAttr/W handle fallback function
|
||||
Subject: [PATCH] odbc32: SQLSetConnectAttr/W handle fallback function
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 16 ++++++++++++++--
|
||||
1 file changed, 14 insertions(+), 2 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 462661f43de..e24557fbb11 100644
|
||||
index 7105f3534ce..dd94e070796 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -2301,7 +2301,13 @@ SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribut
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLSetConnectAttr( handle->win32_handle, Attribute, Value, StringLength );
|
||||
+ if(handle->win32_funcs->SQLSetConnectOption)
|
||||
+ ret = handle->win32_funcs->SQLSetConnectAttr( handle->win32_handle, Attribute, Value, StringLength );
|
||||
+ else if(handle->win32_funcs->SQLSetConnectOption)
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ ret = handle->win32_funcs->SQLSetConnectOption( handle->win32_handle, Attribute, (SQLULEN)Value );
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4429,7 +4435,13 @@ SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLSetConnectAttrW( handle->win32_handle, Attribute, Value, StringLength );
|
||||
+ if (handle->win32_funcs->SQLSetConnectAttrW)
|
||||
+ ret = handle->win32_funcs->SQLSetConnectAttrW( handle->win32_handle, Attribute, Value, StringLength );
|
||||
+ else if(handle->win32_funcs->SQLSetConnectOptionW)
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ ret = handle->win32_funcs->SQLSetConnectOptionW( handle->win32_handle, Attribute, (SQLULEN)Value );
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6123,6 +6123,11 @@ static SQLRETURN set_connect_attr_win32_w( struct handle *handle, SQLINTEGER att
|
||||
if (handle->win32_funcs->SQLSetConnectAttrW)
|
||||
return handle->win32_funcs->SQLSetConnectAttrW( handle->win32_handle, attr, value, len );
|
||||
if (handle->win32_funcs->SQLSetConnectAttr) FIXME( "Unicode to ANSI conversion not handled\n" );
|
||||
+ else if(handle->win32_funcs->SQLSetConnectOptionW)
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ return handle->win32_funcs->SQLSetConnectOptionW( handle->win32_handle, attr, (SQLULEN)value );
|
||||
+ }
|
||||
return SQL_ERROR;
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,8 +1,7 @@
|
||||
From e713bad9827c44a5a7db842845888b67667ae4e7 Mon Sep 17 00:00:00 2001
|
||||
From d92d2f9dab7aa9552dbed099a3f07182c8bad185 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 10 Jul 2024 15:17:00 +1000
|
||||
Subject: [PATCH 10/15] odbc32: Store handles when requesting information of
|
||||
Columns.
|
||||
Subject: [PATCH] odbc32: Store handles when requesting information of Columns.
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 34 +++++++++++++++++++++++++++++++++-
|
||||
@@ -10,14 +9,14 @@ Subject: [PATCH 10/15] odbc32: Store handles when requesting information of
|
||||
2 files changed, 44 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index e24557fbb11..3a9c2802d45 100644
|
||||
index dd94e070796..7120f24b76b 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -4407,7 +4407,39 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute,
|
||||
@@ -6105,7 +6105,39 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute,
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLGetStmtAttrW( handle->win32_handle, Attribute, Value, BufferLength, StringLength );
|
||||
- ret = get_stmt_attr_win32_w( handle, Attribute, Value, BufferLength, StringLength );
|
||||
+ switch(Attribute)
|
||||
+ {
|
||||
+ case SQL_ATTR_APP_ROW_DESC:
|
||||
@@ -49,7 +48,7 @@ index e24557fbb11..3a9c2802d45 100644
|
||||
+ *((SQLHDESC*)Value) = &handle->imp_param_desc;
|
||||
+ break;
|
||||
+ default:
|
||||
+ ret = handle->win32_funcs->SQLGetStmtAttrW( handle->win32_handle, Attribute, Value, BufferLength, StringLength );
|
||||
+ ret = get_stmt_attr_win32_w( handle, Attribute, Value, BufferLength, StringLength );
|
||||
+ }
|
||||
}
|
||||
|
||||
|
@@ -1,18 +1,17 @@
|
||||
From 8c26d09014cdf26756bd808e2c076d9d10f6295f Mon Sep 17 00:00:00 2001
|
||||
From cee76bad632261533d15e6d642367fbb66176564 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 13 Jul 2024 15:23:10 +1000
|
||||
Subject: [PATCH 11/15] odbc32: SQLSetDescFieldW pass correct handle onto
|
||||
driver
|
||||
Subject: [PATCH] odbc32: SQLSetDescFieldW pass correct handle onto driver
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 11 ++++++++---
|
||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 3a9c2802d45..c70b0d80012 100644
|
||||
index 7120f24b76b..ddf6c0ac9f5 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -4387,7 +4387,7 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute,
|
||||
@@ -6086,7 +6086,7 @@ SQLRETURN WINAPI SQLGetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute,
|
||||
SQLINTEGER BufferLength, SQLINTEGER *StringLength)
|
||||
{
|
||||
struct handle *handle = StatementHandle;
|
||||
@@ -21,7 +20,7 @@ index 3a9c2802d45..c70b0d80012 100644
|
||||
|
||||
TRACE("(StatementHandle %p, Attribute %d, Value %p, BufferLength %d, StringLength %p)\n", StatementHandle,
|
||||
Attribute, Value, BufferLength, StringLength);
|
||||
@@ -5299,7 +5299,8 @@ done:
|
||||
@@ -7268,7 +7268,8 @@ static SQLRETURN set_desc_field_win32_w( struct handle *handle, SQLSMALLINT reco
|
||||
SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
|
||||
SQLPOINTER Value, SQLINTEGER BufferLength)
|
||||
{
|
||||
@@ -31,19 +30,19 @@ index 3a9c2802d45..c70b0d80012 100644
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
|
||||
TRACE("(DescriptorHandle %p, RecNumber %d, FieldIdentifier %d, Value %p, BufferLength %d)\n", DescriptorHandle,
|
||||
@@ -5315,7 +5316,11 @@ SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumb
|
||||
@@ -7282,7 +7283,11 @@ SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumb
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLSetDescFieldW( handle->win32_handle, RecNumber, FieldIdentifier, Value,
|
||||
- ret = set_desc_field_win32_w( handle, RecNumber, FieldIdentifier, Value, BufferLength );
|
||||
+ if (handle->imp_param_desc.driver_hdesc)
|
||||
+ ret = handle->win32_funcs->SQLSetDescFieldW( handle->imp_param_desc.driver_hdesc, RecNumber, FieldIdentifier, Value,
|
||||
+ BufferLength );
|
||||
+ else
|
||||
+ ret = handle->win32_funcs->SQLSetDescFieldW( handle->app_param_desc.driver_hdesc, RecNumber, FieldIdentifier, Value,
|
||||
BufferLength );
|
||||
+ ret = set_desc_field_win32_w( handle, RecNumber, FieldIdentifier, Value, BufferLength );
|
||||
}
|
||||
|
||||
TRACE("Returning %d\n", ret);
|
||||
--
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,32 +1,37 @@
|
||||
From d83dcacabf0918cc4cdeb3d6358585d9178defa8 Mon Sep 17 00:00:00 2001
|
||||
From 37a034464df09450fe1d4226bf43ca7588c7894d Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 17 Jul 2024 21:55:20 +1000
|
||||
Subject: [PATCH 13/15] odbc32: SQLGetData support ODBC v2.0
|
||||
Subject: [PATCH] odbc32: SQLGetData support ODBC v2.0
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
dlls/odbc32/proxyodbc.c | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index bb1cae25051..a66ec99b913 100644
|
||||
index be20e967aea..1836164796f 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -1761,6 +1761,15 @@ SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber,
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
@@ -2223,7 +2223,20 @@ static SQLRETURN get_data_win32( struct handle *handle, SQLUSMALLINT column, SQL
|
||||
SQLLEN buflen, SQLLEN *retlen )
|
||||
{
|
||||
if (handle->win32_funcs->SQLGetData)
|
||||
+ {
|
||||
+ if (handle->env_attr_version == SQL_OV_ODBC2)
|
||||
+ {
|
||||
+ if (TargetType == SQL_C_TYPE_TIME)
|
||||
+ TargetType = SQL_C_TIME;
|
||||
+ else if (TargetType == SQL_C_TYPE_DATE)
|
||||
+ TargetType = SQL_C_DATE;
|
||||
+ else if (TargetType == SQL_C_TYPE_TIMESTAMP)
|
||||
+ TargetType = SQL_C_TIMESTAMP;
|
||||
+ if (type == SQL_C_TYPE_TIME)
|
||||
+ type = SQL_C_TIME;
|
||||
+ else if (type == SQL_C_TYPE_DATE)
|
||||
+ type = SQL_C_DATE;
|
||||
+ else if (type == SQL_C_TYPE_TIMESTAMP)
|
||||
+ type = SQL_C_TIMESTAMP;
|
||||
+ }
|
||||
ret = handle->win32_funcs->SQLGetData( handle->win32_handle, ColumnNumber, TargetType, TargetValue,
|
||||
BufferLength, StrLen_or_Ind );
|
||||
}
|
||||
+
|
||||
return handle->win32_funcs->SQLGetData( handle->win32_handle, column, type, value, buflen, retlen );
|
||||
+ }
|
||||
+
|
||||
return SQL_ERROR;
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,35 +1,28 @@
|
||||
From 270c8b4b7f1d7cd91c035545cf223742874ed76a Mon Sep 17 00:00:00 2001
|
||||
From b86180b88e1d485bb628a195e2315be2bada2898 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 17 Jul 2024 22:04:39 +1000
|
||||
Subject: [PATCH 15/15] odbc32: SQLSetStmtAttrW support fallback for ODBC v2.0
|
||||
Subject: [PATCH] odbc32: SQLSetStmtAttrW support fallback for ODBC v2.0
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
dlls/odbc32/proxyodbc.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index a9d23c94504..0de97b542d9 100644
|
||||
index 3429e8a26ce..2464ddfebee 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -5387,7 +5387,17 @@ SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute,
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLSetStmtAttrW( handle->win32_handle, Attribute, Value, StringLength );
|
||||
+ if(handle->win32_funcs->SQLSetStmtAttrW)
|
||||
+ ret = handle->win32_funcs->SQLSetStmtAttrW( handle->win32_handle, Attribute, Value, StringLength );
|
||||
+ else
|
||||
+ {
|
||||
+ /* ODBC v2.0 */
|
||||
+ if (handle->win32_funcs->SQLSetStmtOption)
|
||||
+ {
|
||||
+ ret = handle->win32_funcs->SQLSetStmtOption( handle->win32_handle, Attribute, (SQLULEN)Value );
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
}
|
||||
@@ -7350,6 +7350,11 @@ static SQLRETURN set_stmt_attr_win32_w( struct handle *handle, SQLINTEGER attr,
|
||||
if (handle->win32_funcs->SQLSetStmtAttrW)
|
||||
return handle->win32_funcs->SQLSetStmtAttrW( handle->win32_handle, attr, value, len );
|
||||
if (handle->win32_funcs->SQLSetStmtAttr) FIXME( "Unicode to ANSI conversion not handled\n" );
|
||||
+ else if (handle->win32_funcs->SQLSetStmtOption)
|
||||
+ {
|
||||
+ /* ODBC v2.0 */
|
||||
+ return handle->win32_funcs->SQLSetStmtOption( handle->win32_handle, attr, (SQLULEN)value );
|
||||
+ }
|
||||
return SQL_ERROR;
|
||||
}
|
||||
|
||||
TRACE("Returning %d\n", ret);
|
||||
--
|
||||
2.43.0
|
||||
|
||||
|
@@ -0,0 +1,38 @@
|
||||
From 1d3f665c4081f2675864b98962b4d8a611564063 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 10 Aug 2024 14:38:54 +1000
|
||||
Subject: [PATCH] odbc32: Use SQLAllocHandle to allocated a STMT handle
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 70837003b69..0fa0102f2bb 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -515,12 +515,17 @@ static SQLRETURN alloc_stmt_unix( struct handle *con, struct handle *stmt )
|
||||
|
||||
static SQLRETURN alloc_stmt_win32( struct handle *con, struct handle *stmt )
|
||||
{
|
||||
- if (con->win32_funcs->SQLAllocStmt)
|
||||
+ SQLRETURN ret = SQL_ERROR;
|
||||
+ if (con->win32_funcs->SQLAllocHandle)
|
||||
{
|
||||
- SQLRETURN ret = con->win32_funcs->SQLAllocStmt( con->win32_handle, &stmt->win32_handle );
|
||||
- if (SUCCESS( ret )) stmt->win32_funcs = con->win32_funcs;
|
||||
+ ret = con->win32_funcs->SQLAllocHandle( SQL_HANDLE_STMT, con->win32_handle, &stmt->win32_handle );
|
||||
}
|
||||
- return SQL_ERROR;
|
||||
+ else if (con->win32_funcs->SQLAllocStmt)
|
||||
+ {
|
||||
+ ret = con->win32_funcs->SQLAllocStmt( con->win32_handle, &stmt->win32_handle );
|
||||
+ }
|
||||
+ if (SUCCESS( ret )) stmt->win32_funcs = con->win32_funcs;
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -0,0 +1,25 @@
|
||||
From 14b0cc45d3d19baf6c1f2534f8f31b7b5299c54f Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 10 Aug 2024 14:43:02 +1000
|
||||
Subject: [PATCH] odbc32: Call drivers SQLBindCol function
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 0fa0102f2bb..35744622513 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -664,7 +664,7 @@ static SQLRETURN bind_col_win32( struct handle *handle, SQLUSMALLINT column, SQL
|
||||
SQLLEN buflen, SQLLEN *retlen )
|
||||
{
|
||||
if (handle->win32_funcs->SQLBindCol)
|
||||
- return SQLBindCol( handle->win32_handle, column, type, value, buflen, retlen );
|
||||
+ return handle->win32_funcs->SQLBindCol( handle->win32_handle, column, type, value, buflen, retlen );
|
||||
return SQL_ERROR;
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -0,0 +1,33 @@
|
||||
From e93b8d3f2fe126cc42c4af3f6784f268de5d94f2 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Maurer <dark.shadow4@web.de>
|
||||
Date: Fri, 19 Jul 2024 00:06:37 +0200
|
||||
Subject: [PATCH] printdlg: Allow button id psh1 for "Properties" button.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55841
|
||||
---
|
||||
dlls/comdlg32/printdlg.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c
|
||||
index aed486a9b09..b5c67c3abad 100644
|
||||
--- a/dlls/comdlg32/printdlg.c
|
||||
+++ b/dlls/comdlg32/printdlg.c
|
||||
@@ -1796,6 +1796,7 @@ static LRESULT PRINTDLG_WMCommandA(HWND hDlg, WPARAM wParam,
|
||||
}
|
||||
break;
|
||||
|
||||
+ case psh1: /* Setup button */
|
||||
case psh2: /* Properties button */
|
||||
{
|
||||
HANDLE hPrinter;
|
||||
@@ -1952,6 +1953,7 @@ static LRESULT PRINTDLG_WMCommandW(HWND hDlg, WPARAM wParam,
|
||||
}
|
||||
break;
|
||||
|
||||
+ case psh1: /* Setup button */
|
||||
case psh2: /* Properties button */
|
||||
{
|
||||
HANDLE hPrinter;
|
||||
--
|
||||
2.43.0
|
||||
|
3
patches/printdlg-properties_btn/definition
Normal file
3
patches/printdlg-properties_btn/definition
Normal file
@@ -0,0 +1,3 @@
|
||||
Fixes: [55841] Support print "Properties" button.
|
||||
|
||||
# PR 6119
|
@@ -1,15 +1,15 @@
|
||||
From 72e0335ca16cd47b520db1fec02b5961d6da8da7 Mon Sep 17 00:00:00 2001
|
||||
From 578afa6089ac629fca4aec814cba2b534aabbf28 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 26 Feb 2015 23:21:26 +0100
|
||||
Subject: [PATCH] shell32: Pass FILE_INFORMATION into SHNotify* functions.
|
||||
|
||||
Preparation of the progressbar work. Based on a patch by Huw Campbell.
|
||||
---
|
||||
dlls/shell32/shlfileop.c | 201 +++++++++++++++++++--------------------
|
||||
1 file changed, 98 insertions(+), 103 deletions(-)
|
||||
dlls/shell32/shlfileop.c | 214 +++++++++++++++++++--------------------
|
||||
1 file changed, 104 insertions(+), 110 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
|
||||
index 40d2c1d8a3c..07ab3f805aa 100644
|
||||
index 9d2d4dc3f82..4bd486a7426 100644
|
||||
--- a/dlls/shell32/shlfileop.c
|
||||
+++ b/dlls/shell32/shlfileop.c
|
||||
@@ -55,16 +55,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
@@ -379,18 +379,58 @@ index 40d2c1d8a3c..07ab3f805aa 100644
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -1381,16 +1378,16 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1381,12 +1378,12 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
}
|
||||
|
||||
/* moves a file or directory to another directory */
|
||||
-static void move_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo)
|
||||
+static void move_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo)
|
||||
/* move a directory to another directory */
|
||||
-static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo)
|
||||
+static void move_dir_to_dir(FILE_OPERATION *op, BOOL multidest, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo)
|
||||
{
|
||||
WCHAR szDestPath[MAX_PATH];
|
||||
WCHAR from[MAX_PATH], to[MAX_PATH];
|
||||
|
||||
PathCombineW(szDestPath, feTo->szFullPath, feFrom->szFilename);
|
||||
- SHNotifyMoveFileW(feFrom->szFullPath, szDestPath);
|
||||
+ SHNotifyMoveFileW(op, feFrom->szFullPath, szDestPath);
|
||||
/* Windows doesn't combine path when FOF_MULTIDESTFILES is set */
|
||||
- if (lpFileOp->fFlags & FOF_MULTIDESTFILES)
|
||||
+ if (op->req->fFlags & FOF_MULTIDESTFILES)
|
||||
lstrcpyW(to, feTo->szFullPath);
|
||||
else
|
||||
PathCombineW(to, feTo->szFullPath, feFrom->szFilename);
|
||||
@@ -1397,15 +1394,14 @@ static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom
|
||||
with wildcard and restart SHFileOperationW */
|
||||
if (PathFileExistsW(to))
|
||||
{
|
||||
- SHFILEOPSTRUCTW fileOp;
|
||||
+ SHFILEOPSTRUCTW fileOp = {0};
|
||||
|
||||
PathCombineW(from, feFrom->szFullPath, L"*.*");
|
||||
from[lstrlenW(from) + 1] = '\0';
|
||||
|
||||
- fileOp = *lpFileOp;
|
||||
fileOp.pFrom = from;
|
||||
fileOp.pTo = to;
|
||||
- fileOp.fFlags &= ~FOF_MULTIDESTFILES; /* we know we're moving to one dir */
|
||||
+ fileOp.fFlags = op->req->fFlags & ~FOF_MULTIDESTFILES; /* we know we're moving to one dir */
|
||||
|
||||
/* Don't ask the user about overwriting files when he accepted to overwrite the
|
||||
folder. FIXME: this is not exactly what Windows does - e.g. there would be
|
||||
@@ -1418,22 +1414,22 @@ static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom
|
||||
}
|
||||
else
|
||||
{
|
||||
- SHNotifyMoveFileW(feFrom->szFullPath, to);
|
||||
+ SHNotifyMoveFileW(op, feFrom->szFullPath, to);
|
||||
}
|
||||
}
|
||||
|
||||
/* move a file to another directory */
|
||||
-static void move_file_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo)
|
||||
+static void move_file_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo)
|
||||
{
|
||||
WCHAR to[MAX_PATH];
|
||||
|
||||
PathCombineW(to, feTo->szFullPath, feFrom->szFilename);
|
||||
to[lstrlenW(to) + 1] = '\0';
|
||||
- SHNotifyMoveFileW(feFrom->szFullPath, to);
|
||||
+ SHNotifyMoveFileW(op, feFrom->szFullPath, to);
|
||||
}
|
||||
|
||||
/* the FO_MOVE operation */
|
||||
@@ -399,7 +439,7 @@ index 40d2c1d8a3c..07ab3f805aa 100644
|
||||
{
|
||||
DWORD i;
|
||||
INT mismatched = 0;
|
||||
@@ -1404,14 +1401,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1447,14 +1443,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
if (!flTo->dwNumFiles)
|
||||
return ERROR_FILE_NOT_FOUND;
|
||||
|
||||
@@ -416,7 +456,7 @@ index 40d2c1d8a3c..07ab3f805aa 100644
|
||||
flFrom->dwNumFiles > flTo->dwNumFiles)
|
||||
{
|
||||
return ERROR_CANCELLED;
|
||||
@@ -1421,7 +1416,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1464,7 +1458,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
if (ret && ret != ERROR_ALREADY_EXISTS)
|
||||
return ret;
|
||||
|
||||
@@ -425,7 +465,7 @@ index 40d2c1d8a3c..07ab3f805aa 100644
|
||||
mismatched = flFrom->dwNumFiles - flTo->dwNumFiles;
|
||||
|
||||
fileDest = &flTo->feFiles[0];
|
||||
@@ -1432,7 +1427,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1475,7 +1469,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
if (!PathFileExistsW(fileDest->szDirectory))
|
||||
return ERROR_CANCELLED;
|
||||
|
||||
@@ -434,19 +474,23 @@ index 40d2c1d8a3c..07ab3f805aa 100644
|
||||
{
|
||||
if (i >= flTo->dwNumFiles)
|
||||
break;
|
||||
@@ -1446,9 +1441,9 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
}
|
||||
|
||||
@@ -1491,12 +1485,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
if (fileDest->bExists && IsAttribDir(fileDest->attributes))
|
||||
- move_to_dir(lpFileOp, entryToMove, fileDest);
|
||||
+ move_to_dir(op, entryToMove, fileDest);
|
||||
{
|
||||
if (IsAttribDir(entryToMove->attributes))
|
||||
- move_dir_to_dir(lpFileOp, entryToMove, fileDest);
|
||||
+ move_dir_to_dir(op, multidest, entryToMove, fileDest);
|
||||
else
|
||||
- move_file_to_dir(lpFileOp, entryToMove, fileDest);
|
||||
+ move_file_to_dir(op, entryToMove, fileDest);
|
||||
}
|
||||
else
|
||||
- SHNotifyMoveFileW(entryToMove->szFullPath, fileDest->szFullPath);
|
||||
+ SHNotifyMoveFileW(op, entryToMove->szFullPath, fileDest->szFullPath);
|
||||
}
|
||||
|
||||
if (mismatched > 0)
|
||||
@@ -1463,7 +1458,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1511,7 +1505,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
}
|
||||
|
||||
/* the FO_RENAME files */
|
||||
@@ -455,7 +499,7 @@ index 40d2c1d8a3c..07ab3f805aa 100644
|
||||
{
|
||||
const FILE_ENTRY *feFrom;
|
||||
const FILE_ENTRY *feTo;
|
||||
@@ -1485,7 +1480,7 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
|
||||
@@ -1533,7 +1527,7 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
|
||||
if (feTo->bExists)
|
||||
return ERROR_ALREADY_EXISTS;
|
||||
|
||||
@@ -464,7 +508,7 @@ index 40d2c1d8a3c..07ab3f805aa 100644
|
||||
}
|
||||
|
||||
/* alert the user if an unsupported flag is used */
|
||||
@@ -1532,16 +1527,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1580,16 +1574,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
switch (lpFileOp->wFunc)
|
||||
{
|
||||
case FO_COPY:
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From cf8475eaf811ff2a51703697b0c5f114eb570e1f Mon Sep 17 00:00:00 2001
|
||||
From 51a2f87c887ca4ff669780f8bfc6c188a4e87813 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 27 Feb 2015 01:04:33 +0100
|
||||
Subject: [PATCH] shell32: Implement file operation progress dialog.
|
||||
@@ -11,10 +11,10 @@ Based on a patch by Huw Campbell.
|
||||
3 files changed, 285 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc
|
||||
index f899a27f12c..264947d337d 100644
|
||||
index b054f55ba9d..58363d0c942 100644
|
||||
--- a/dlls/shell32/shell32.rc
|
||||
+++ b/dlls/shell32/shell32.rc
|
||||
@@ -182,6 +182,13 @@ If the files in the destination folder have the same names as files in the\n\
|
||||
@@ -184,6 +184,13 @@ If the files in the destination folder have the same names as files in the\n\
|
||||
selected folder they will be replaced. Do you still want to move or copy\n\
|
||||
the folder?"
|
||||
|
||||
@@ -29,10 +29,10 @@ index f899a27f12c..264947d337d 100644
|
||||
IDS_RESTART_TITLE "Restart"
|
||||
IDS_RESTART_PROMPT "Do you want to simulate a Windows reboot?"
|
||||
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
|
||||
index 6ed3d0a84d7..c743b9e6948 100644
|
||||
index 4bd486a7426..e8b4b67f413 100644
|
||||
--- a/dlls/shell32/shlfileop.c
|
||||
+++ b/dlls/shell32/shlfileop.c
|
||||
@@ -62,6 +62,10 @@ typedef struct
|
||||
@@ -61,6 +61,10 @@ typedef struct
|
||||
DWORD dwYesToAllMask;
|
||||
BOOL bManyItems;
|
||||
BOOL bCancelled;
|
||||
@@ -43,7 +43,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
} FILE_OPERATION;
|
||||
|
||||
typedef struct
|
||||
@@ -100,6 +104,12 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly);
|
||||
@@ -99,6 +103,12 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly);
|
||||
static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFrom, FILE_LIST *flTo);
|
||||
static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFrom, const FILE_LIST *flTo);
|
||||
|
||||
@@ -56,7 +56,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
/* Confirm dialogs with an optional "Yes To All" as used in file operations confirmations
|
||||
*/
|
||||
struct confirm_msg_info
|
||||
@@ -385,6 +395,13 @@ static DWORD SHELL_DeleteDirectoryW(FILE_OPERATION *op, LPCWSTR pszDir, BOOL bSh
|
||||
@@ -384,6 +394,13 @@ static DWORD SHELL_DeleteDirectoryW(FILE_OPERATION *op, LPCWSTR pszDir, BOOL bSh
|
||||
ret = SHELL_DeleteDirectoryW(op, szTemp, FALSE);
|
||||
else
|
||||
ret = SHNotifyDeleteFileW(op, szTemp);
|
||||
@@ -70,7 +70,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
} while (!ret && FindNextFileW(hFind, &wfd));
|
||||
}
|
||||
FindClose(hFind);
|
||||
@@ -538,10 +555,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path)
|
||||
@@ -537,10 +554,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path)
|
||||
static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
|
||||
{
|
||||
BOOL ret;
|
||||
@@ -94,7 +94,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
|
||||
ret = DeleteFileW(path);
|
||||
if (!ret)
|
||||
@@ -554,6 +583,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
|
||||
@@ -553,6 +582,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
|
||||
}
|
||||
if (ret)
|
||||
{
|
||||
@@ -109,7 +109,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
SHChangeNotify(SHCNE_DELETE, SHCNF_PATHW, path, NULL);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
@@ -588,9 +625,10 @@ static DWORD SHNotifyMoveFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest)
|
||||
@@ -587,9 +624,10 @@ static DWORD SHNotifyMoveFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest)
|
||||
|
||||
TRACE("(%s %s)\n", debugstr_w(src), debugstr_w(dest));
|
||||
|
||||
@@ -122,7 +122,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
|
||||
/* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
|
||||
if (!ret)
|
||||
@@ -640,14 +678,15 @@ static DWORD SHNotifyCopyFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO
|
||||
@@ -639,14 +677,15 @@ static DWORD SHNotifyCopyFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO
|
||||
|
||||
TRACE("(%s %s %s)\n", debugstr_w(src), debugstr_w(dest), bFailIfExists ? "failIfExists" : "");
|
||||
|
||||
@@ -140,7 +140,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
if (ret)
|
||||
{
|
||||
SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, dest, NULL);
|
||||
@@ -1287,6 +1326,8 @@ static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
|
||||
@@ -1285,6 +1324,8 @@ static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
|
||||
}
|
||||
|
||||
/* Vista return code. XP would return e.g. ERROR_FILE_NOT_FOUND, ERROR_ALREADY_EXISTS */
|
||||
@@ -149,7 +149,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
if (op->bCancelled)
|
||||
return ERROR_CANCELLED;
|
||||
}
|
||||
@@ -1367,13 +1408,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom)
|
||||
@@ -1365,13 +1406,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom)
|
||||
|
||||
/* delete the file or directory */
|
||||
if (IsAttribFile(fileEntry->attributes))
|
||||
@@ -169,8 +169,8 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
@@ -1448,6 +1493,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
|
||||
move_to_dir(op, entryToMove, fileDest);
|
||||
@@ -1491,6 +1536,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
|
||||
}
|
||||
else
|
||||
SHNotifyMoveFileW(op, entryToMove->szFullPath, fileDest->szFullPath);
|
||||
+
|
||||
@@ -181,7 +181,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
}
|
||||
|
||||
if (mismatched > 0)
|
||||
@@ -1507,6 +1557,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1550,6 +1600,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
{
|
||||
FILE_OPERATION op;
|
||||
FILE_LIST flFrom, flTo;
|
||||
@@ -189,7 +189,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
int ret = 0;
|
||||
|
||||
if (!lpFileOp)
|
||||
@@ -1525,9 +1576,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1568,9 +1619,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
|
||||
ZeroMemory(&op, sizeof(op));
|
||||
op.req = lpFileOp;
|
||||
@@ -221,7 +221,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
switch (lpFileOp->wFunc)
|
||||
{
|
||||
case FO_COPY:
|
||||
@@ -1547,6 +1620,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1590,6 +1663,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
destroy_file_list(&flFrom);
|
||||
|
||||
if (lpFileOp->wFunc != FO_DELETE)
|
||||
@@ -1555,6 +1634,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1598,6 +1677,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
if (ret == ERROR_CANCELLED)
|
||||
lpFileOp->fAnyOperationsAborted = TRUE;
|
||||
|
||||
@@ -244,7 +244,7 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
return ret;
|
||||
}
|
||||
@@ -2043,3 +2125,184 @@ HRESULT WINAPI IFileOperation_Constructor(IUnknown *outer, REFIID riid, void **o
|
||||
@@ -2086,3 +2168,184 @@ HRESULT WINAPI IFileOperation_Constructor(IUnknown *outer, REFIID riid, void **o
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -430,10 +430,10 @@ index 6ed3d0a84d7..c743b9e6948 100644
|
||||
+ return op->bCancelled ? PROGRESS_CANCEL : PROGRESS_CONTINUE;
|
||||
+}
|
||||
diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h
|
||||
index af8eb46a09f..210046e729d 100644
|
||||
index cee1069142c..607015909cc 100644
|
||||
--- a/dlls/shell32/shresdef.h
|
||||
+++ b/dlls/shell32/shresdef.h
|
||||
@@ -147,6 +147,14 @@
|
||||
@@ -153,6 +153,14 @@
|
||||
#define IDM_RECYCLEBIN_RESTORE 301
|
||||
#define IDM_RECYCLEBIN_ERASE 302
|
||||
|
||||
@@ -449,5 +449,5 @@ index af8eb46a09f..210046e729d 100644
|
||||
#define IDS_RECYCLEBIN_FOLDER_NAME 8964
|
||||
|
||||
--
|
||||
2.33.0
|
||||
2.43.0
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user