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
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1f9ec5ea26 | ||
|
5a586ba5cb | ||
|
d776fcfa06 | ||
|
b8b2c3a701 | ||
|
56ba066baf | ||
|
5c6c431443 | ||
|
a7f3224a3a | ||
|
d2f75e3101 | ||
|
cdcfae0a00 | ||
|
8a93e0c0ef | ||
|
1977f6c82a | ||
|
9e8e2ae892 | ||
|
87a5dcecb7 | ||
|
88e86a23c0 | ||
|
87cf242f01 | ||
|
2f712afe77 | ||
|
6e641992a3 | ||
|
03c0de0368 | ||
|
52d70e2ee4 | ||
|
6c033276e3 |
@@ -1,4 +1,4 @@
|
||||
From a207d7f2c77296798e047ed03d88d8a060139aff Mon Sep 17 00:00:00 2001
|
||||
From 8dcb8ee100c5f81cef92ec98376288253b021f6a Mon Sep 17 00:00:00 2001
|
||||
From: Jason Edmeades <us@edmeades.me.uk>
|
||||
Date: Tue, 16 Jul 2019 13:49:18 +1000
|
||||
Subject: [PATCH] cmd: Support for launching programs based on file association
|
||||
@@ -11,14 +11,14 @@ fred.msi for msiexec to be launched.
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18154
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36646
|
||||
---
|
||||
programs/cmd/wcmdmain.c | 138 +++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 102 insertions(+), 36 deletions(-)
|
||||
programs/cmd/wcmdmain.c | 139 +++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 102 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
|
||||
index cacb7ea7751..19a807c1624 100644
|
||||
index 5f1a94b39b3..487be39c954 100644
|
||||
--- a/programs/cmd/wcmdmain.c
|
||||
+++ b/programs/cmd/wcmdmain.c
|
||||
@@ -1135,8 +1135,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
@@ -1385,8 +1385,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
|
||||
/* 1. If extension supplied, see if that file exists */
|
||||
if (extensionsupplied) {
|
||||
@@ -30,7 +30,7 @@ index cacb7ea7751..19a807c1624 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1166,6 +1168,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
@@ -1416,6 +1418,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
}
|
||||
|
||||
if (GetFileAttributesW(thisDir) != INVALID_FILE_ATTRIBUTES) {
|
||||
@@ -38,7 +38,7 @@ index cacb7ea7751..19a807c1624 100644
|
||||
found = TRUE;
|
||||
thisExt = NULL;
|
||||
}
|
||||
@@ -1187,52 +1190,115 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
@@ -1437,52 +1440,114 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
/* Special case BAT and CMD */
|
||||
if (ext && (!wcsicmp(ext, L".bat") || !wcsicmp(ext, L".cmd"))) {
|
||||
BOOL oldinteractive = interactive;
|
||||
@@ -46,11 +46,9 @@ index cacb7ea7751..19a807c1624 100644
|
||||
interactive = FALSE;
|
||||
WCMD_batch (thisDir, command, called, NULL, INVALID_HANDLE_VALUE);
|
||||
interactive = oldinteractive;
|
||||
+ WINE_TRACE("Back from call to batch program\n");
|
||||
return;
|
||||
- } else {
|
||||
+ }
|
||||
|
||||
- DWORD exit_code;
|
||||
- /* thisDir contains the file to be launched, but with what?
|
||||
- eg. a.exe will require a.exe to be launched, a.html may be iexplore */
|
||||
- hinst = FindExecutableW (thisDir, NULL, temp);
|
||||
@@ -74,6 +72,8 @@ index cacb7ea7751..19a807c1624 100644
|
||||
- WCMD_strip_quotes(command);
|
||||
- opt_s = TRUE;
|
||||
- WCMD_run_program(command, called);
|
||||
+ }
|
||||
+
|
||||
+ /* Calculate what program will be launched, and whether it is a
|
||||
+ console application or not. Note the program may be different
|
||||
+ from the parameter (eg running a .txt file will launch notepad.exe) */
|
||||
@@ -157,8 +157,8 @@ index cacb7ea7751..19a807c1624 100644
|
||||
- or for console applications */
|
||||
- if (!interactive || (console && !HIWORD(console)))
|
||||
- WaitForSingleObject (pe.hProcess, INFINITE);
|
||||
- GetExitCodeProcess (pe.hProcess, &errorlevel);
|
||||
- if (errorlevel == STILL_ACTIVE) errorlevel = 0;
|
||||
- GetExitCodeProcess (pe.hProcess, &exit_code);
|
||||
- errorlevel = (exit_code == STILL_ACTIVE) ? 0 : exit_code;
|
||||
+ if (!status) {
|
||||
+ WINE_TRACE("Failed to launch via CreateProcess, rc %d (%ld)\n",
|
||||
+ status, GetLastError());
|
||||
@@ -190,5 +190,5 @@ index cacb7ea7751..19a807c1624 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.29.2
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 28b0030ac5f486875dff6f5f34779844f1a031cf Mon Sep 17 00:00:00 2001
|
||||
From f6d47bb4eb5747fde7059271a560268080756791 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 11 Jan 2015 16:29:30 +0100
|
||||
Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
|
||||
@@ -11,23 +11,23 @@ Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
|
||||
3 files changed, 65 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
|
||||
index 5d8f5b332f8..f1f41c6e4d7 100644
|
||||
index 001a7f26f4f..b322765d164 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_private.h
|
||||
+++ b/dlls/d3dx9_36/d3dx9_private.h
|
||||
@@ -127,6 +127,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
|
||||
@@ -182,6 +182,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
|
||||
IDirect3DSurface9 **temp_surface, BOOL write);
|
||||
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect,
|
||||
IDirect3DSurface9 *temp_surface, BOOL update);
|
||||
+HRESULT save_dds_texture_to_memory(ID3DXBuffer **dst_buffer, IDirect3DBaseTexture9 *src_texture,
|
||||
+ const PALETTEENTRY *src_palette);
|
||||
|
||||
unsigned short float_32_to_16(const float in);
|
||||
float float_16_to_32(const unsigned short in);
|
||||
HRESULT d3dx_pixels_init(const void *data, uint32_t row_pitch, uint32_t slice_pitch,
|
||||
const PALETTEENTRY *palette, D3DFORMAT format, uint32_t left, uint32_t top, uint32_t right, uint32_t bottom,
|
||||
uint32_t front, uint32_t back, struct d3dx_pixels *pixels);
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index ca40018af24..9ff5b4901b8 100644
|
||||
index fb49ca5665a..2a8bd97fe2d 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -650,6 +650,68 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
@@ -560,6 +560,68 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ index ca40018af24..9ff5b4901b8 100644
|
||||
const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key,
|
||||
const D3DXIMAGE_INFO *src_info)
|
||||
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
|
||||
index 2ee79b51f79..7ceef158d07 100644
|
||||
index 52cfb1e8c34..ccbe1fcef20 100644
|
||||
--- a/dlls/d3dx9_36/texture.c
|
||||
+++ b/dlls/d3dx9_36/texture.c
|
||||
@@ -1858,10 +1858,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
|
||||
@@ -113,5 +113,5 @@ index 2ee79b51f79..7ceef158d07 100644
|
||||
type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
switch (type)
|
||||
--
|
||||
2.40.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From ec18233558b62aa736b5ecf20d2f7487e2823286 Mon Sep 17 00:00:00 2001
|
||||
From 9b9b36ccc66866ba142ce1f0d12190025ac2e7f7 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Thu, 7 Jun 2018 20:09:59 -0500
|
||||
Subject: [PATCH] server: Create server objects for eventfd-based
|
||||
@@ -15,10 +15,10 @@ Subject: [PATCH] server: Create server objects for eventfd-based
|
||||
create mode 100644 server/esync.h
|
||||
|
||||
diff --git a/server/Makefile.in b/server/Makefile.in
|
||||
index 3b9446fe224..776faec63e4 100644
|
||||
index ae502dbf17d..b164193ef20 100644
|
||||
--- a/server/Makefile.in
|
||||
+++ b/server/Makefile.in
|
||||
@@ -11,6 +11,7 @@ C_SRCS = \
|
||||
@@ -11,6 +11,7 @@ SOURCES = \
|
||||
debugger.c \
|
||||
device.c \
|
||||
directory.c \
|
||||
@@ -381,7 +381,7 @@ index 00000000000..00f9e638d83
|
||||
+extern int do_esync(void);
|
||||
+void esync_init(void);
|
||||
diff --git a/server/main.c b/server/main.c
|
||||
index a134d811d82..3436b0871b4 100644
|
||||
index ddda5f4e86e..5062d0999fa 100644
|
||||
--- a/server/main.c
|
||||
+++ b/server/main.c
|
||||
@@ -34,6 +34,7 @@
|
||||
@@ -403,10 +403,10 @@ index a134d811d82..3436b0871b4 100644
|
||||
set_current_time();
|
||||
init_scheduler();
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 99df502e398..9e15ada5bd0 100644
|
||||
index e86d3414247..03bc0aeb11e 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3777,7 +3777,6 @@ struct handle_info
|
||||
@@ -3867,7 +3867,6 @@ struct handle_info
|
||||
obj_handle_t handle; /* process handle */
|
||||
@END
|
||||
|
||||
@@ -414,11 +414,10 @@ index 99df502e398..9e15ada5bd0 100644
|
||||
/* Iterate thread list for process */
|
||||
@REQ(get_next_thread)
|
||||
obj_handle_t process; /* process handle */
|
||||
@@ -3788,3 +3787,27 @@ struct handle_info
|
||||
@REPLY
|
||||
@@ -3879,6 +3878,29 @@ struct handle_info
|
||||
obj_handle_t handle; /* next thread handle */
|
||||
@END
|
||||
+
|
||||
|
||||
+enum esync_type
|
||||
+{
|
||||
+ ESYNC_SEMAPHORE = 1,
|
||||
@@ -442,6 +441,14 @@ index 99df502e398..9e15ada5bd0 100644
|
||||
+ int type; /* actual type (may be different for events) */
|
||||
+ unsigned int shm_idx;
|
||||
+@END
|
||||
|
||||
/* Setup keyboard auto-repeat */
|
||||
@REQ(set_keyboard_repeat)
|
||||
@@ -3888,3 +3910,4 @@ struct handle_info
|
||||
@REPLY
|
||||
int enable; /* previous state of auto-repeat enable */
|
||||
@END
|
||||
+
|
||||
--
|
||||
2.38.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 193c44f510beed365640159cbdaeb0cb8186a7b0 Mon Sep 17 00:00:00 2001
|
||||
From 2f23f37d5a1ba0d59d367729d96285ac7c470e8d Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <z.figura12@gmail.com>
|
||||
Date: Fri, 8 Jun 2018 18:55:49 -0500
|
||||
Subject: [PATCH] server: Add a request to get the eventfd file descriptor
|
||||
@@ -6,14 +6,14 @@ Subject: [PATCH] server: Add a request to get the eventfd file descriptor
|
||||
|
||||
---
|
||||
server/esync.c | 37 +++++++++++++++++++++++++++++++++++++
|
||||
server/protocol.def | 8 ++++++++
|
||||
2 files changed, 45 insertions(+)
|
||||
server/protocol.def | 9 ++++++++-
|
||||
2 files changed, 45 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index d646cb52bc2..cfbbcf55c48 100644
|
||||
index f95dc5a391f..85f7f1e060f 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -335,3 +335,40 @@ DECL_HANDLER(create_esync)
|
||||
@@ -333,3 +333,40 @@ DECL_HANDLER(create_esync)
|
||||
|
||||
if (root) release_object( root );
|
||||
}
|
||||
@@ -55,14 +55,13 @@ index d646cb52bc2..cfbbcf55c48 100644
|
||||
+ release_object( obj );
|
||||
+}
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 552d504cc8d..9062a5020c2 100644
|
||||
index 03bc0aeb11e..4ab6b97ba93 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3689,3 +3689,11 @@ enum esync_type
|
||||
int type; /* actual type (may be different for events) */
|
||||
@@ -3902,6 +3902,14 @@ enum esync_type
|
||||
unsigned int shm_idx;
|
||||
@END
|
||||
+
|
||||
|
||||
+/* Retrieve the esync fd for an object. */
|
||||
+@REQ(get_esync_fd)
|
||||
+ obj_handle_t handle; /* handle to the object */
|
||||
@@ -70,6 +69,15 @@ index 552d504cc8d..9062a5020c2 100644
|
||||
+ int type;
|
||||
+ unsigned int shm_idx;
|
||||
+@END
|
||||
+
|
||||
/* Setup keyboard auto-repeat */
|
||||
@REQ(set_keyboard_repeat)
|
||||
int enable; /* whether to enable auto-repeat */
|
||||
@@ -3910,4 +3918,3 @@ enum esync_type
|
||||
@REPLY
|
||||
int enable; /* previous state of auto-repeat enable */
|
||||
@END
|
||||
-
|
||||
--
|
||||
2.28.0
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From ad881c0cf988811e4b8662eac50f8998dfed40ca Mon Sep 17 00:00:00 2001
|
||||
From a43255ead53a49837e7995ab4de0afa8e05e6334 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 15:11:12 -0500
|
||||
Subject: [PATCH] server: Create eventfd file descriptors for process objects.
|
||||
@@ -49,7 +49,7 @@ index 00f9e638d83..8522d8a69ae 100644
|
||||
void esync_init(void);
|
||||
+int esync_create_fd( int initval, int flags );
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index 4a5ef0876b0..a7be3ee3876 100644
|
||||
index 031c0fece13..eb073551b57 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -63,6 +63,7 @@
|
||||
@@ -85,9 +85,9 @@ index 4a5ef0876b0..a7be3ee3876 100644
|
||||
list_init( &process->kernel_object );
|
||||
list_init( &process->thread_list );
|
||||
list_init( &process->locks );
|
||||
@@ -744,6 +747,9 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
|
||||
if (!token_assign_label( process->token, &high_label_sid ))
|
||||
goto error;
|
||||
@@ -738,6 +741,9 @@ struct process *create_process( int fd, struct process *parent, unsigned int fla
|
||||
if (!process->handles || !process->token) goto error;
|
||||
process->session_id = token_get_session_id( process->token );
|
||||
|
||||
+ if (do_esync())
|
||||
+ process->esync_fd = esync_create_fd( 0, 0 );
|
||||
@@ -95,7 +95,7 @@ index 4a5ef0876b0..a7be3ee3876 100644
|
||||
set_fd_events( process->msg_fd, POLLIN ); /* start listening to events */
|
||||
return process;
|
||||
|
||||
@@ -792,6 +798,7 @@ static void process_destroy( struct object *obj )
|
||||
@@ -786,6 +792,7 @@ static void process_destroy( struct object *obj )
|
||||
free( process->rawinput_devices );
|
||||
free( process->dir_cache );
|
||||
free( process->image );
|
||||
@@ -103,7 +103,7 @@ index 4a5ef0876b0..a7be3ee3876 100644
|
||||
}
|
||||
|
||||
/* dump a process on stdout for debugging purposes */
|
||||
@@ -809,6 +816,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
|
||||
@@ -803,6 +810,13 @@ static int process_signaled( struct object *obj, struct wait_queue_entry *entry
|
||||
return !process->running_threads;
|
||||
}
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From d7b142aa0b60d99bd225849439cd49119a6e3e80 Mon Sep 17 00:00:00 2001
|
||||
From 465a4772356f406552cc20bddec820a4e197b667 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 16:11:23 -0500
|
||||
Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
@@ -6,8 +6,8 @@ Subject: [PATCH] server, ntdll: Implement message waits.
|
||||
---
|
||||
dlls/ntdll/unix/esync.c | 51 +++++++++++++++++++++++++++++++++++++++--
|
||||
server/protocol.def | 5 ++++
|
||||
server/queue.c | 21 +++++++++++++++++
|
||||
3 files changed, 75 insertions(+), 2 deletions(-)
|
||||
server/queue.c | 22 ++++++++++++++++++
|
||||
3 files changed, 76 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 399930c444b..06d7d8babc6 100644
|
||||
@@ -105,23 +105,25 @@ index 399930c444b..06d7d8babc6 100644
|
||||
{
|
||||
struct stat st;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index a2700b043ba..fb290c7964c 100644
|
||||
index 4ab6b97ba93..d28c1a6f5fa 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3907,3 +3907,8 @@ enum esync_type
|
||||
int type;
|
||||
@@ -3910,6 +3910,10 @@ enum esync_type
|
||||
unsigned int shm_idx;
|
||||
@END
|
||||
+
|
||||
+/* Notify the server that we are doing a message wait or done with one. */
|
||||
|
||||
+@REQ(esync_msgwait)
|
||||
+ int in_msgwait; /* are we in a message wait? */
|
||||
+@END
|
||||
+
|
||||
/* Setup keyboard auto-repeat */
|
||||
@REQ(set_keyboard_repeat)
|
||||
int enable; /* whether to enable auto-repeat */
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 936a6309683..fc13b1cf6eb 100644
|
||||
index 1568355104c..b68774d7524 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -148,6 +148,7 @@ struct msg_queue
|
||||
@@ -149,6 +149,7 @@ struct msg_queue
|
||||
int keystate_lock; /* owns an input keystate lock */
|
||||
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
|
||||
int esync_fd; /* esync file descriptor (signalled on message) */
|
||||
@@ -129,7 +131,7 @@ index 936a6309683..fc13b1cf6eb 100644
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -321,6 +322,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -322,6 +323,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->keystate_lock = 0;
|
||||
queue->ignore_post_msg = 0;
|
||||
queue->esync_fd = -1;
|
||||
@@ -137,7 +139,7 @@ index 936a6309683..fc13b1cf6eb 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -1108,6 +1110,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
@@ -1115,6 +1117,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
if (get_wait_queue_thread(entry)->queue == queue)
|
||||
return 0; /* thread is waiting on queue -> not hung */
|
||||
}
|
||||
@@ -148,11 +150,10 @@ index 936a6309683..fc13b1cf6eb 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3735,3 +3741,18 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
release_object( desktop );
|
||||
@@ -3923,6 +3929,21 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
}
|
||||
}
|
||||
+
|
||||
|
||||
+DECL_HANDLER(esync_msgwait)
|
||||
+{
|
||||
+ struct msg_queue *queue = get_current_queue();
|
||||
@@ -167,6 +168,15 @@ index 936a6309683..fc13b1cf6eb 100644
|
||||
+ if (queue->fd)
|
||||
+ set_fd_events( queue->fd, req->in_msgwait ? POLLIN : 0 );
|
||||
+}
|
||||
+
|
||||
DECL_HANDLER(set_keyboard_repeat)
|
||||
{
|
||||
struct desktop *desktop;
|
||||
@@ -3941,3 +3962,4 @@ DECL_HANDLER(set_keyboard_repeat)
|
||||
|
||||
release_object( desktop );
|
||||
}
|
||||
+
|
||||
--
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 2d3957bbd6fb87e30bde05713c97ad42d57b3cf1 Mon Sep 17 00:00:00 2001
|
||||
From 5f5cfac7099cf4e5be912f07a66665f8217f57f3 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 17:17:31 -0500
|
||||
Subject: [PATCH] ntdll, server: Implement alertable waits.
|
||||
@@ -15,10 +15,10 @@ Subject: [PATCH] ntdll, server: Implement alertable waits.
|
||||
8 files changed, 109 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index d1a282c65e9..2a7c3865617 100644
|
||||
index 2844f9f760c..aeeea1731ce 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -607,17 +607,42 @@ static void update_grabbed_object( struct esync *obj )
|
||||
@@ -599,17 +599,42 @@ static void update_grabbed_object( struct esync *obj )
|
||||
static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_any,
|
||||
BOOLEAN alertable, const LARGE_INTEGER *timeout )
|
||||
{
|
||||
@@ -62,7 +62,7 @@ index d1a282c65e9..2a7c3865617 100644
|
||||
NtQuerySystemTime( &now );
|
||||
if (timeout)
|
||||
{
|
||||
@@ -656,6 +681,8 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
@@ -648,6 +673,8 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
|
||||
if (msgwait)
|
||||
TRACE(" or driver events");
|
||||
@@ -71,7 +71,7 @@ index d1a282c65e9..2a7c3865617 100644
|
||||
|
||||
if (!timeout)
|
||||
TRACE(", timeout = INFINITE.\n");
|
||||
@@ -692,12 +719,27 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
@@ -684,12 +711,27 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
fds[i].fd = obj ? obj->fd : -1;
|
||||
fds[i].events = POLLIN;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ index d1a282c65e9..2a7c3865617 100644
|
||||
/* Find out which object triggered the wait. */
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
@@ -771,6 +813,14 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
@@ -763,6 +805,14 @@ static NTSTATUS __esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEA
|
||||
tryagain:
|
||||
/* First step: try to poll on each object in sequence. */
|
||||
fds[0].events = POLLIN;
|
||||
@@ -115,7 +115,7 @@ index d1a282c65e9..2a7c3865617 100644
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
struct esync *obj = objs[i];
|
||||
@@ -786,9 +836,11 @@ tryagain:
|
||||
@@ -778,9 +828,11 @@ tryagain:
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ index d1a282c65e9..2a7c3865617 100644
|
||||
|
||||
if (fds[0].revents & (POLLHUP | POLLERR | POLLNVAL))
|
||||
{
|
||||
@@ -804,10 +856,12 @@ tryagain:
|
||||
@@ -796,10 +848,12 @@ tryagain:
|
||||
fds[i].fd = objs[i] ? objs[i]->fd : -1;
|
||||
fds[i].events = POLLIN;
|
||||
}
|
||||
@@ -143,7 +143,7 @@ index d1a282c65e9..2a7c3865617 100644
|
||||
{
|
||||
/* Quick, grab everything. */
|
||||
for (i = 0; i < count; i++)
|
||||
@@ -873,6 +927,19 @@ err:
|
||||
@@ -865,6 +919,19 @@ err:
|
||||
ERR("ppoll failed: %s\n", strerror(errno));
|
||||
return errno_to_status( errno );
|
||||
}
|
||||
@@ -164,10 +164,10 @@ index d1a282c65e9..2a7c3865617 100644
|
||||
|
||||
/* We need to let the server know when we are doing a message wait, and when we
|
||||
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h
|
||||
index c8c959029d0..1d40afcb569 100644
|
||||
index b278ab8df84..a3f0368b731 100644
|
||||
--- a/dlls/ntdll/unix/unix_private.h
|
||||
+++ b/dlls/ntdll/unix/unix_private.h
|
||||
@@ -52,6 +52,7 @@ struct ntdll_thread_data
|
||||
@@ -93,6 +93,7 @@ struct ntdll_thread_data
|
||||
{
|
||||
void *cpu_data[16]; /* reserved for CPU-specific data */
|
||||
void *kernel_stack; /* stack for thread startup and kernel syscalls */
|
||||
@@ -176,10 +176,10 @@ index c8c959029d0..1d40afcb569 100644
|
||||
int reply_fd; /* fd for receiving server replies */
|
||||
int wait_fd[2]; /* fd for sleeping server requests */
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 83b8b892b0f..977bfdd2dd2 100644
|
||||
index 2116b677adb..a7d0bb7e8c8 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -2888,6 +2888,7 @@ static TEB *init_teb( void *ptr, BOOL is_wow )
|
||||
@@ -3646,6 +3646,7 @@ static TEB *init_teb( void *ptr, BOOL is_wow )
|
||||
teb->StaticUnicodeString.Buffer = teb->StaticUnicodeBuffer;
|
||||
teb->StaticUnicodeString.MaximumLength = sizeof(teb->StaticUnicodeBuffer);
|
||||
thread_data = (struct ntdll_thread_data *)&teb->GdiTebBatch;
|
||||
@@ -188,10 +188,10 @@ index 83b8b892b0f..977bfdd2dd2 100644
|
||||
thread_data->reply_fd = -1;
|
||||
thread_data->wait_fd[0] = -1;
|
||||
diff --git a/server/esync.c b/server/esync.c
|
||||
index ad5403bd4e0..3aa3a22df68 100644
|
||||
index c5587bef6cf..0c365006f0b 100644
|
||||
--- a/server/esync.c
|
||||
+++ b/server/esync.c
|
||||
@@ -348,19 +348,25 @@ int esync_create_fd( int initval, int flags )
|
||||
@@ -346,19 +346,25 @@ int esync_create_fd( int initval, int flags )
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ index ad5403bd4e0..3aa3a22df68 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,3 +504,9 @@ DECL_HANDLER(get_esync_fd)
|
||||
@@ -496,3 +502,9 @@ DECL_HANDLER(get_esync_fd)
|
||||
|
||||
release_object( obj );
|
||||
}
|
||||
@@ -232,10 +232,10 @@ index ad5403bd4e0..3aa3a22df68 100644
|
||||
+ send_client_fd( current->process, current->esync_apc_fd, current->id );
|
||||
+}
|
||||
diff --git a/server/esync.h b/server/esync.h
|
||||
index aeb58c5469c..cea025d9308 100644
|
||||
index 689d8569b73..e1588d205d9 100644
|
||||
--- a/server/esync.h
|
||||
+++ b/server/esync.h
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -23,6 +23,7 @@
|
||||
extern int do_esync(void);
|
||||
void esync_init(void);
|
||||
int esync_create_fd( int initval, int flags );
|
||||
@@ -244,22 +244,22 @@ index aeb58c5469c..cea025d9308 100644
|
||||
void esync_clear( int fd );
|
||||
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 5eadd8795f2..bb6f1d1c589 100644
|
||||
index 8c728080d05..3ea700054c6 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3784,3 +3784,7 @@ enum esync_type
|
||||
@REQ(esync_msgwait)
|
||||
int in_msgwait; /* are we in a message wait? */
|
||||
@@ -3935,3 +3935,7 @@ enum esync_type
|
||||
@REPLY
|
||||
int enable; /* previous state of auto-repeat enable */
|
||||
@END
|
||||
+
|
||||
+/* Retrieve the fd to wait on for user APCs. */
|
||||
+@REQ(get_esync_apc_fd)
|
||||
+@END
|
||||
diff --git a/server/thread.c b/server/thread.c
|
||||
index 10da1e3d4c7..258c3f28815 100644
|
||||
index fd6b91b228a..8d7c520ced7 100644
|
||||
--- a/server/thread.c
|
||||
+++ b/server/thread.c
|
||||
@@ -228,6 +228,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
@@ -232,6 +232,7 @@ static inline void init_thread_structure( struct thread *thread )
|
||||
thread->teb = 0;
|
||||
thread->entry_point = 0;
|
||||
thread->esync_fd = -1;
|
||||
@@ -267,7 +267,7 @@ index 10da1e3d4c7..258c3f28815 100644
|
||||
thread->system_regs = 0;
|
||||
thread->queue = NULL;
|
||||
thread->wait = NULL;
|
||||
@@ -375,7 +376,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
@@ -380,7 +381,10 @@ struct thread *create_thread( int fd, struct process *process, const struct secu
|
||||
}
|
||||
|
||||
if (do_esync())
|
||||
@@ -278,7 +278,7 @@ index 10da1e3d4c7..258c3f28815 100644
|
||||
|
||||
set_fd_events( thread->request_fd, POLLIN ); /* start listening to events */
|
||||
add_process_thread( thread->process, thread );
|
||||
@@ -1164,8 +1168,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr
|
||||
@@ -1174,8 +1178,13 @@ static int queue_apc( struct process *process, struct thread *thread, struct thr
|
||||
grab_object( apc );
|
||||
list_add_tail( queue, &apc->entry );
|
||||
if (!list_prev( queue, &apc->entry )) /* first one */
|
||||
@@ -292,7 +292,7 @@ index 10da1e3d4c7..258c3f28815 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1211,6 +1220,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system
|
||||
@@ -1221,6 +1230,10 @@ static struct thread_apc *thread_dequeue_apc( struct thread *thread, int system
|
||||
apc = LIST_ENTRY( ptr, struct thread_apc, entry );
|
||||
list_remove( ptr );
|
||||
}
|
||||
@@ -304,10 +304,10 @@ index 10da1e3d4c7..258c3f28815 100644
|
||||
}
|
||||
|
||||
diff --git a/server/thread.h b/server/thread.h
|
||||
index 8a5a8501d9c..e5145f9eb07 100644
|
||||
index 9129e473ba9..10e9e28b432 100644
|
||||
--- a/server/thread.h
|
||||
+++ b/server/thread.h
|
||||
@@ -55,6 +55,7 @@ struct thread
|
||||
@@ -56,6 +56,7 @@ struct thread
|
||||
thread_id_t id; /* thread id */
|
||||
struct list mutex_list; /* list of currently owned mutexes */
|
||||
int esync_fd; /* esync file descriptor (signalled on exit) */
|
||||
@@ -316,5 +316,5 @@ index 8a5a8501d9c..e5145f9eb07 100644
|
||||
struct msg_queue *queue; /* message queue */
|
||||
struct thread_wait *wait; /* current wait condition if sleeping */
|
||||
--
|
||||
2.30.2
|
||||
2.43.0
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,23 +1,24 @@
|
||||
From ed0548c0f726d46beb1684845572e6b27c2de46b Mon Sep 17 00:00:00 2001
|
||||
From 64af6ff6f7ac46823bc98e5b70bff87c46652aab Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 4 Feb 2023 09:16:29 +1100
|
||||
Subject: [PATCH] odbc32: Implement SQLDriverConnectW
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 334 +++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 333 insertions(+), 1 deletion(-)
|
||||
dlls/odbc32/proxyodbc.c | 367 +++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 365 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 8306dc89878..b44aa7fcc2b 100644
|
||||
index 070f0197742..30baf1866a4 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -53,10 +53,247 @@ struct SQLHDBC_data
|
||||
@@ -53,10 +53,248 @@ struct SQLHDBC_data
|
||||
{
|
||||
int type;
|
||||
struct SQLHENV_data *environment;
|
||||
+ HMODULE module;
|
||||
+ SQLHENV driver_env;
|
||||
+ SQLHDBC driver_hdbc;
|
||||
+ SQLHENV driver_env;
|
||||
+ SQLINTEGER driver_ver; /* ODBC version supported by driver */
|
||||
+ SQLHDBC driver_hdbc;
|
||||
+
|
||||
+ SQLRETURN (WINAPI *pSQLAllocConnect)(SQLHENV,SQLHDBC*);
|
||||
+ SQLRETURN (WINAPI *pSQLAllocEnv)(SQLHENV*);
|
||||
@@ -259,7 +260,7 @@ index 8306dc89878..b44aa7fcc2b 100644
|
||||
/*************************************************************************
|
||||
* SQLAllocConnect [ODBC32.001]
|
||||
*/
|
||||
@@ -77,6 +314,7 @@ SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionH
|
||||
@@ -77,6 +315,7 @@ SQLRETURN WINAPI SQLAllocConnect(SQLHENV EnvironmentHandle, SQLHDBC *ConnectionH
|
||||
hdbc->type = SQL_HANDLE_DBC;
|
||||
hdbc->environment = EnvironmentHandle;
|
||||
hdbc->login_timeout = 0;
|
||||
@@ -267,7 +268,7 @@ index 8306dc89878..b44aa7fcc2b 100644
|
||||
|
||||
*ConnectionHandle = hdbc;
|
||||
|
||||
@@ -438,6 +676,8 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle)
|
||||
@@ -438,6 +677,8 @@ SQLRETURN WINAPI SQLFreeConnect(SQLHDBC ConnectionHandle)
|
||||
return SQL_ERROR;
|
||||
}
|
||||
|
||||
@@ -276,11 +277,11 @@ index 8306dc89878..b44aa7fcc2b 100644
|
||||
free(hdbc);
|
||||
|
||||
return SQL_SUCCESS;
|
||||
@@ -1596,6 +1836,62 @@ SQLRETURN WINAPI SQLColumnsW(SQLHSTMT StatementHandle, WCHAR *CatalogName, SQLSM
|
||||
@@ -1596,6 +1837,65 @@ SQLRETURN WINAPI SQLColumnsW(SQLHSTMT StatementHandle, WCHAR *CatalogName, SQLSM
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static HMODULE load_odbc_driver(const WCHAR *driver)
|
||||
+static HMODULE load_odbc_driver(const WCHAR *driver, BOOL use_dsn)
|
||||
+{
|
||||
+ long ret;
|
||||
+ HMODULE hmod;
|
||||
@@ -288,7 +289,10 @@ index 8306dc89878..b44aa7fcc2b 100644
|
||||
+ HKEY hkey;
|
||||
+ WCHAR regpath[256];
|
||||
+
|
||||
+ wcscpy(regpath, L"Software\\ODBC\\ODBC.INI\\");
|
||||
+ if (use_dsn)
|
||||
+ wcscpy(regpath, L"Software\\ODBC\\ODBC.INI\\");
|
||||
+ else
|
||||
+ wcscpy(regpath, L"Software\\ODBC\\ODBCINST.INI\\");
|
||||
+ wcscat(regpath, driver);
|
||||
+
|
||||
+ if ((ret = RegOpenKeyW(HKEY_CURRENT_USER, regpath, &hkey)) != ERROR_SUCCESS)
|
||||
@@ -339,7 +343,7 @@ index 8306dc89878..b44aa7fcc2b 100644
|
||||
/*************************************************************************
|
||||
* SQLDriverConnectW [ODBC32.141]
|
||||
*/
|
||||
@@ -1603,13 +1899,49 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
||||
@@ -1603,13 +1903,76 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
||||
SQLSMALLINT Length, WCHAR *OutConnectionString, SQLSMALLINT BufferLength,
|
||||
SQLSMALLINT *Length2, SQLUSMALLINT DriverCompletion)
|
||||
{
|
||||
@@ -348,11 +352,13 @@ index 8306dc89878..b44aa7fcc2b 100644
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
+ WCHAR dsn[128];
|
||||
+ WCHAR *p;
|
||||
+ BOOL is_dsn = TRUE;
|
||||
|
||||
- FIXME("(ConnectionHandle %p, WindowHandle %p, InConnectionString %s, Length %d, OutConnectionString %p,"
|
||||
+ TRACE("(ConnectionHandle %p, WindowHandle %p, InConnectionString %s, Length %d, OutConnectionString %p,"
|
||||
" BufferLength %d, Length2 %p, DriverCompletion %d)\n", ConnectionHandle, WindowHandle,
|
||||
debugstr_wn(InConnectionString, Length), Length, OutConnectionString, BufferLength, Length2,
|
||||
- debugstr_wn(InConnectionString, Length), Length, OutConnectionString, BufferLength, Length2,
|
||||
+ Length == SQL_NTS ? debugstr_w(InConnectionString) : debugstr_wn(InConnectionString, Length), Length, OutConnectionString, BufferLength, Length2,
|
||||
DriverCompletion);
|
||||
|
||||
+ p = wcsstr(InConnectionString, L"DSN=");
|
||||
@@ -362,19 +368,45 @@ index 8306dc89878..b44aa7fcc2b 100644
|
||||
+
|
||||
+ lstrcpynW(dsn, p+4, end - (p + 3));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ p = wcsstr(InConnectionString, L"Driver=");
|
||||
+ if (p)
|
||||
+ {
|
||||
+ WCHAR *end = wcsstr(p, L";");
|
||||
+
|
||||
+ driver = load_odbc_driver(dsn);
|
||||
+ lstrcpynW(dsn, p+7, end - (p + 6));
|
||||
+ is_dsn = FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ driver = load_odbc_driver(dsn, is_dsn);
|
||||
+ if (!driver)
|
||||
+ return SQL_ERROR;
|
||||
+
|
||||
+ connection->module = driver;
|
||||
+ connection->driver_ver = SQL_OV_ODBC2;
|
||||
+ connection_bind_sql_funcs(connection);
|
||||
+
|
||||
+ /* ODBC 3.x */
|
||||
+ if (connection->pSQLAllocHandle)
|
||||
+ {
|
||||
+ connection->pSQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &connection->driver_env);
|
||||
+ connection->pSQLAllocHandle(SQL_HANDLE_DBC, connection->driver_env, &connection->driver_hdbc);
|
||||
+
|
||||
+ if (connection->pSQLGetEnvAttr)
|
||||
+ connection->pSQLGetEnvAttr(connection->driver_env, SQL_ATTR_ODBC_VERSION, &connection->driver_ver, 0, NULL);
|
||||
+
|
||||
+ }
|
||||
+ /* ODBC 2.x */
|
||||
+ else if(connection->pSQLAllocConnect && connection->pSQLAllocEnv)
|
||||
+ {
|
||||
+ connection->pSQLAllocEnv(&connection->driver_env);
|
||||
+
|
||||
+ connection->pSQLAllocConnect(connection->driver_env, &connection->driver_hdbc);
|
||||
+ }
|
||||
+ else
|
||||
+ ERR("No functions to allocated Environment handles found.\n");
|
||||
+
|
||||
+ if(!connection->pSQLDriverConnectW)
|
||||
+ {
|
||||
|
@@ -1,18 +1,60 @@
|
||||
From 54744cb90ebf7ebe9ae60e6f4de12586c6d2083f Mon Sep 17 00:00:00 2001
|
||||
From 827ccc5a0ef8a1b1e1290d7225f25619ca11fcf0 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 6 Feb 2023 08:55:12 +1100
|
||||
Subject: [PATCH 10/42] odbc32: Foward SQLSetConnectAttr requets onto the
|
||||
driver
|
||||
Subject: [PATCH] odbc32: Foward SQLSetConnectAttr requets onto the driver
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 49 ++++++++++++++++++++++++++++++++++++-----
|
||||
1 file changed, 44 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 6e4e1a68011..89062e9cadf 100644
|
||||
index e816caa0daa..00822d9d263 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -1812,6 +1812,7 @@ SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu
|
||||
@@ -1042,11 +1042,40 @@ SQLRETURN WINAPI SQLRowCount(SQLHSTMT StatementHandle, SQLLEN *RowCount)
|
||||
SQLRETURN WINAPI SQLSetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value,
|
||||
SQLINTEGER StringLength)
|
||||
{
|
||||
- SQLRETURN ret = SQL_ERROR;
|
||||
+ struct SQLHDBC_data *hdbc = ConnectionHandle;
|
||||
+ SQLRETURN ret = SQL_SUCCESS;
|
||||
|
||||
- FIXME("(ConnectionHandle %p, Attribute %d, Value %p, StringLength %d)\n", ConnectionHandle, Attribute, Value,
|
||||
+ TRACE("(ConnectionHandle %p, Attribute %d, Value %p, StringLength %d)\n", ConnectionHandle, Attribute, Value,
|
||||
StringLength);
|
||||
|
||||
+ if (hdbc->type != SQL_HANDLE_DBC)
|
||||
+ {
|
||||
+ WARN("Wrong handle type %d\n", hdbc->type);
|
||||
+ return SQL_ERROR;
|
||||
+ }
|
||||
+
|
||||
+ switch(Attribute)
|
||||
+ {
|
||||
+ case SQL_ATTR_LOGIN_TIMEOUT:
|
||||
+ if (Value)
|
||||
+ hdbc->login_timeout = (intptr_t)Value;
|
||||
+ else
|
||||
+ hdbc->login_timeout = 0;
|
||||
+ break;
|
||||
+ default:
|
||||
+ if (hdbc->pSQLSetConnectAttr)
|
||||
+ ret = hdbc->pSQLSetConnectAttr(hdbc->driver_hdbc, Attribute, Value, StringLength);
|
||||
+ else if(hdbc->pSQLSetConnectOption)
|
||||
+ ret = hdbc->pSQLSetConnectOption(hdbc->driver_hdbc, Attribute, (SQLULEN)Value);
|
||||
+ else
|
||||
+ {
|
||||
+ FIXME("Unsupported Attribute %d\n", Attribute);
|
||||
+ ret = SQL_ERROR;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ TRACE("ret %d\n", ret);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1802,6 +1831,7 @@ SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu
|
||||
SQLINTEGER StringLength)
|
||||
{
|
||||
struct SQLHDBC_data *hdbc = ConnectionHandle;
|
||||
@@ -20,7 +62,7 @@ index 6e4e1a68011..89062e9cadf 100644
|
||||
|
||||
TRACE("(ConnectionHandle %p, Attribute %d, Value %p, StringLength %d)\n", ConnectionHandle, Attribute, Value,
|
||||
StringLength);
|
||||
@@ -1831,11 +1832,18 @@ SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu
|
||||
@@ -1821,11 +1851,20 @@ SQLRETURN WINAPI SQLSetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu
|
||||
hdbc->login_timeout = 0;
|
||||
break;
|
||||
default:
|
||||
@@ -28,6 +70,8 @@ index 6e4e1a68011..89062e9cadf 100644
|
||||
- return SQL_ERROR;
|
||||
+ if (hdbc->pSQLSetConnectAttrW)
|
||||
+ ret = hdbc->pSQLSetConnectAttrW(hdbc->driver_hdbc, Attribute, Value, StringLength);
|
||||
+ else if(hdbc->pSQLSetConnectOptionW)
|
||||
+ ret = hdbc->pSQLSetConnectOptionW(hdbc->driver_hdbc, Attribute, (SQLULEN)Value);
|
||||
+ else
|
||||
+ {
|
||||
+ FIXME("Unsupported Attribute %d\n", Attribute);
|
||||
@@ -43,5 +87,5 @@ index 6e4e1a68011..89062e9cadf 100644
|
||||
|
||||
/*************************************************************************
|
||||
--
|
||||
2.39.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,18 +1,17 @@
|
||||
From f5914eea19b16f6312de43ff72b289c82c08f846 Mon Sep 17 00:00:00 2001
|
||||
From 618ae30847043d66cc952fd6a58c319a8eee698d Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 6 Feb 2023 09:08:27 +1100
|
||||
Subject: [PATCH 12/42] odbc32: Forward SQLGetConnectAttr/W requets onto the
|
||||
driver
|
||||
Subject: [PATCH] odbc32: Forward SQLGetConnectAttr/W requets onto the driver
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 34 ++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 32 insertions(+), 2 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 42 +++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 40 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 7e92b90b10c..96357cd3f1d 100644
|
||||
index 3a1d8ba1d08..333d040be8c 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -739,11 +739,26 @@ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option)
|
||||
@@ -729,11 +729,30 @@ SQLRETURN WINAPI SQLFreeStmt(SQLHSTMT StatementHandle, SQLUSMALLINT Option)
|
||||
SQLRETURN WINAPI SQLGetConnectAttr(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value,
|
||||
SQLINTEGER BufferLength, SQLINTEGER *StringLength)
|
||||
{
|
||||
@@ -34,13 +33,17 @@ index 7e92b90b10c..96357cd3f1d 100644
|
||||
+ ret = connection->pSQLGetConnectAttr(connection->driver_hdbc, Attribute, Value,
|
||||
+ BufferLength, StringLength);
|
||||
+ }
|
||||
+ else if (connection->pSQLGetConnectOption)
|
||||
+ {
|
||||
+ ret = connection->pSQLGetConnectOption(connection->driver_hdbc, Attribute, Value);
|
||||
+ }
|
||||
+
|
||||
+ TRACE("ret %d\n", ret);
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1721,11 +1736,26 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN
|
||||
@@ -1711,11 +1730,30 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN
|
||||
SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribute, SQLPOINTER Value,
|
||||
SQLINTEGER BufferLength, SQLINTEGER *StringLength)
|
||||
{
|
||||
@@ -62,6 +65,10 @@ index 7e92b90b10c..96357cd3f1d 100644
|
||||
+ ret = connection->pSQLGetConnectAttrW(connection->driver_hdbc, Attribute, Value,
|
||||
+ BufferLength, StringLength);
|
||||
+ }
|
||||
+ else if (connection->pSQLGetConnectOptionW)
|
||||
+ {
|
||||
+ ret = connection->pSQLGetConnectOptionW(connection->driver_hdbc, Attribute, Value);
|
||||
+ }
|
||||
+
|
||||
+ TRACE("ret %d\n", ret);
|
||||
+
|
||||
@@ -69,5 +76,5 @@ index 7e92b90b10c..96357cd3f1d 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
From eeab9933053871380bac92db0a9e7444be7f9374 Mon Sep 17 00:00:00 2001
|
||||
From ae3542748782dea8b9213c0d015f09ac94c13bf9 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 6 Feb 2023 09:59:14 +1100
|
||||
Subject: [PATCH 15/42] odbc32: Forward SQLSetStmtAttr/W request to driver
|
||||
Subject: [PATCH] odbc32: Forward SQLSetStmtAttr/W request to driver
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 30 ++++++++++++++++++++++++++++--
|
||||
1 file changed, 28 insertions(+), 2 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 38 ++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 36 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 4ec5ecfcb83..d0be7b600bf 100644
|
||||
index b3b10917660..0f868331ac9 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -1242,11 +1242,24 @@ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNum
|
||||
@@ -1265,11 +1265,28 @@ SQLRETURN WINAPI SQLSetParam(SQLHSTMT StatementHandle, SQLUSMALLINT ParameterNum
|
||||
SQLRETURN WINAPI SQLSetStmtAttr(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value,
|
||||
SQLINTEGER StringLength)
|
||||
{
|
||||
@@ -32,12 +32,16 @@ index 4ec5ecfcb83..d0be7b600bf 100644
|
||||
+ {
|
||||
+ ret = statement->connection->pSQLSetStmtAttr(statement->driver_stmt, Attribute, Value, StringLength);
|
||||
+ }
|
||||
+ else if (statement->connection->pSQLSetStmtOption)
|
||||
+ {
|
||||
+ ret = statement->connection->pSQLSetStmtOption( statement->driver_stmt, Attribute, (SQLULEN) Value );
|
||||
+ }
|
||||
+
|
||||
+ TRACE("ret %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2378,11 +2391,24 @@ SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumb
|
||||
@@ -2430,11 +2447,28 @@ SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumb
|
||||
SQLRETURN WINAPI SQLSetStmtAttrW(SQLHSTMT StatementHandle, SQLINTEGER Attribute, SQLPOINTER Value,
|
||||
SQLINTEGER StringLength)
|
||||
{
|
||||
@@ -58,11 +62,15 @@ index 4ec5ecfcb83..d0be7b600bf 100644
|
||||
+ {
|
||||
+ ret = statement->connection->pSQLSetStmtAttrW(statement->driver_stmt, Attribute, Value, StringLength);
|
||||
+ }
|
||||
+ else if (statement->connection->pSQLSetStmtOption)
|
||||
+ {
|
||||
+ ret = statement->connection->pSQLSetStmtOption( statement->driver_stmt, Attribute, (SQLULEN) Value );
|
||||
+ }
|
||||
+
|
||||
+ TRACE("ret %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
--
|
||||
2.39.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,19 +1,19 @@
|
||||
From 89c345e13d530c284be111076b5b17abb7d3487b Mon Sep 17 00:00:00 2001
|
||||
From a760ceac67ab2ba73b7a5245793a9b720da3ec49 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 6 Feb 2023 13:15:48 +1100
|
||||
Subject: [PATCH 30/42] odbc32: Forward SQLGetDiagField/W request onto driver
|
||||
Subject: [PATCH] odbc32: Forward SQLGetDiagField/W request onto driver
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 46 +++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 44 insertions(+), 2 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 48 +++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 46 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 846b788b76b..74e5d70cfef 100644
|
||||
index 407da1e4c1a..cc907f4fc2e 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -963,9 +963,30 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM
|
||||
@@ -958,9 +958,31 @@ SQLRETURN WINAPI SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSM
|
||||
{
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
SQLRETURN ret = SQL_NO_DATA;
|
||||
|
||||
- FIXME("(HandleType %d, Handle %p, RecNumber %d, DiagIdentifier %d, DiagInfo %p, BufferLength %d,"
|
||||
+ TRACE("(HandleType %d, Handle %p, RecNumber %d, DiagIdentifier %d, DiagInfo %p, BufferLength %d,"
|
||||
@@ -40,12 +40,13 @@ index 846b788b76b..74e5d70cfef 100644
|
||||
+ DiagIdentifier, DiagInfo, BufferLength, StringLength);
|
||||
+ }
|
||||
+
|
||||
+ TRACE("ret %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2131,9 +2152,30 @@ SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLS
|
||||
@@ -2166,9 +2188,31 @@ SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLS
|
||||
{
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
SQLRETURN ret = SQL_NO_DATA;
|
||||
|
||||
- FIXME("(HandleType %d, Handle %p, RecNumber %d, DiagIdentifier %d, DiagInfo %p, BufferLength %d,"
|
||||
+ TRACE("(HandleType %d, Handle %p, RecNumber %d, DiagIdentifier %d, DiagInfo %p, BufferLength %d,"
|
||||
@@ -72,9 +73,10 @@ index 846b788b76b..74e5d70cfef 100644
|
||||
+ DiagIdentifier, DiagInfo, BufferLength, StringLength);
|
||||
+ }
|
||||
+
|
||||
+ TRACE("ret %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
--
|
||||
2.39.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,25 +1,25 @@
|
||||
From ce7011a2e2ef487f3c11b8c5d2328a7618b70ae7 Mon Sep 17 00:00:00 2001
|
||||
From 9023d5ee59640a56a4015db678e9630e32d168b6 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 6 Feb 2023 14:11:44 +1100
|
||||
Subject: [PATCH] odbc32: Forward SQLSetDescFieldW request onto driver
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 9 ++++++++-
|
||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 39d509c28e1..921729d7c22 100644
|
||||
index d06683f1852..4ea07470b05 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -2212,6 +2212,7 @@ SQLRETURN WINAPI SQLGetDiagFieldW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLS
|
||||
ret = statement->connection->pSQLGetDiagFieldW(HandleType, statement->driver_stmt, RecNumber,
|
||||
DiagIdentifier, DiagInfo, BufferLength, StringLength);
|
||||
@@ -2185,6 +2185,7 @@ SQLRETURN WINAPI SQLGetConnectAttrW(SQLHDBC ConnectionHandle, SQLINTEGER Attribu
|
||||
{
|
||||
ret = connection->pSQLGetConnectOptionW(connection->driver_hdbc, Attribute, Value);
|
||||
}
|
||||
+ TRACE("ret %d\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -2784,12 +2785,18 @@ SQLRETURN WINAPI SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT fDirection,
|
||||
TRACE("ret %d\n", ret);
|
||||
|
||||
@@ -2852,11 +2853,17 @@ SQLRETURN WINAPI SQLDriversW(SQLHENV EnvironmentHandle, SQLUSMALLINT fDirection,
|
||||
SQLRETURN WINAPI SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber, SQLSMALLINT FieldIdentifier,
|
||||
SQLPOINTER Value, SQLINTEGER BufferLength)
|
||||
{
|
||||
@@ -30,16 +30,14 @@ index 39d509c28e1..921729d7c22 100644
|
||||
+ TRACE("(DescriptorHandle %p, RecNumber %d, FieldIdentifier %d, Value %p, BufferLength %d)\n", DescriptorHandle,
|
||||
RecNumber, FieldIdentifier, Value, BufferLength);
|
||||
|
||||
- return ret;
|
||||
+ if (hdesc->parent->connection->pSQLSetDescFieldW)
|
||||
+ ret = hdesc->parent->connection->pSQLSetDescFieldW(hdesc->driver_hdesc, RecNumber, FieldIdentifier,
|
||||
+ Value, BufferLength);
|
||||
+ TRACE("ret %d\n", ret);
|
||||
+
|
||||
+ return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
--
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
From 8d90ba32bbd212d36cbdd47c595c76b4f324d4f8 Mon Sep 17 00:00:00 2001
|
||||
From 204e31dd1d93a967f57b35678e196c3271b2cd49 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 6 Feb 2023 15:13:09 +1100
|
||||
Subject: [PATCH 33/42] odbc32: Forward SQLGetData request onto driver
|
||||
Subject: [PATCH] odbc32: Forward SQLGetData request onto driver
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
dlls/odbc32/proxyodbc.c | 26 +++++++++++++++++++++++++-
|
||||
1 file changed, 25 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 7589ba7d9d4..4e98c8c7caa 100644
|
||||
index f7032a66ca6..c8e715bdd67 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -926,11 +926,25 @@ SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName,
|
||||
@@ -922,11 +922,35 @@ SQLRETURN WINAPI SQLGetCursorName(SQLHSTMT StatementHandle, SQLCHAR *CursorName,
|
||||
SQLRETURN WINAPI SQLGetData(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
|
||||
SQLPOINTER TargetValue, SQLLEN BufferLength, SQLLEN *StrLen_or_Ind)
|
||||
{
|
||||
@@ -30,6 +30,16 @@ index 7589ba7d9d4..4e98c8c7caa 100644
|
||||
+
|
||||
+ if (statement->connection->pSQLGetData)
|
||||
+ {
|
||||
+ if(statement->connection->driver_ver == SQL_OV_ODBC2 &&
|
||||
+ statement->connection->environment->version == SQL_OV_ODBC3)
|
||||
+ {
|
||||
+ 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;
|
||||
+ }
|
||||
+ ret = statement->connection->pSQLGetData(statement->driver_stmt, ColumnNumber, TargetType,
|
||||
+ TargetValue, BufferLength, StrLen_or_Ind);
|
||||
+ }
|
||||
@@ -39,5 +49,5 @@ index 7589ba7d9d4..4e98c8c7caa 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
From 4fe0ad96bddd96ff4eb2b3786765ff7a547974d8 Mon Sep 17 00:00:00 2001
|
||||
From b6d2054d5cd0787c18631e520594e9442c76781d Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 6 Feb 2023 15:40:24 +1100
|
||||
Subject: [PATCH 35/42] odbc32: Forward SQLBindParameter request onto driver
|
||||
Subject: [PATCH] odbc32: Forward SQLBindParameter request onto driver
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 16 +++++++++++++++-
|
||||
1 file changed, 15 insertions(+), 1 deletion(-)
|
||||
dlls/odbc32/proxyodbc.c | 37 ++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 36 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 7f8cc57e968..f73daad254f 100644
|
||||
index 40128395b32..4d2f472740c 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -1901,12 +1901,26 @@ SQLRETURN WINAPI SQLBindParameter(SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT
|
||||
@@ -1893,12 +1893,47 @@ SQLRETURN WINAPI SQLBindParameter(SQLHSTMT hstmt, SQLUSMALLINT ipar, SQLSMALLINT
|
||||
SQLSMALLINT ibScale, SQLPOINTER rgbValue, SQLLEN cbValueMax,
|
||||
SQLLEN *pcbValue)
|
||||
{
|
||||
@@ -34,11 +34,32 @@ index 7f8cc57e968..f73daad254f 100644
|
||||
+ ret = statement->connection->pSQLBindParameter(statement->driver_stmt, ipar, fParamType,
|
||||
+ fCType, fSqlType, cbColDef, ibScale, rgbValue, cbValueMax, pcbValue);
|
||||
+ }
|
||||
+ else if(statement->connection->pSQLBindParam)
|
||||
+ {
|
||||
+ /* TODO: Make function */
|
||||
+ if(fCType == SQL_C_TYPE_TIME)
|
||||
+ fCType = SQL_C_TIME;
|
||||
+ else if(fCType == SQL_C_TYPE_DATE)
|
||||
+ fCType = SQL_C_DATE;
|
||||
+ else if(fCType == SQL_C_TYPE_TIMESTAMP)
|
||||
+ fCType = SQL_C_TIMESTAMP;
|
||||
+
|
||||
+ /* TODO: Make function */
|
||||
+ if (fSqlType == SQL_TIME)
|
||||
+ fSqlType = SQL_TYPE_TIME;
|
||||
+ else if (fSqlType == SQL_DATE)
|
||||
+ fSqlType = SQL_TYPE_DATE;
|
||||
+ else if (fSqlType == SQL_TIMESTAMP)
|
||||
+ fSqlType = SQL_TYPE_TIMESTAMP;
|
||||
+
|
||||
+ ret = statement->connection->pSQLBindParam(statement->driver_stmt, ipar, fCType, fSqlType,
|
||||
+ cbColDef, ibScale, rgbValue, pcbValue);
|
||||
+ }
|
||||
+
|
||||
+ TRACE("ret %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
--
|
||||
2.39.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
From 5fa88dabafbfb905553310a211a2701ad17f6df6 Mon Sep 17 00:00:00 2001
|
||||
From 76850074a3e3f4a1de4503eb81748af85e4bdd13 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 7 Feb 2023 14:18:20 +1100
|
||||
Subject: [PATCH 37/42] odbc32: Forward SQLGetDiagRecW request onto driver
|
||||
Subject: [PATCH] odbc32: Forward SQLGetDiagRecW request onto driver
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 28 +++++++++++++++++++++++++++-
|
||||
1 file changed, 27 insertions(+), 1 deletion(-)
|
||||
dlls/odbc32/proxyodbc.c | 42 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 41 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index c73912b38cf..bdd8361d221 100644
|
||||
index a5a3c0186eb..692324a93a3 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -2286,10 +2286,36 @@ SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA
|
||||
@@ -2280,10 +2280,50 @@ SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA
|
||||
{
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
|
||||
@@ -29,16 +29,30 @@ index c73912b38cf..bdd8361d221 100644
|
||||
+ struct SQLHDBC_data *hdbc = Handle;
|
||||
+
|
||||
+ if (hdbc->pSQLGetDiagRecW)
|
||||
+ {
|
||||
+ ret = hdbc->pSQLGetDiagRecW(HandleType, hdbc->driver_hdbc, RecNumber, Sqlstate,
|
||||
+ NativeError, MessageText, BufferLength, TextLength);
|
||||
+ }
|
||||
+ else if (hdbc->pSQLErrorW)
|
||||
+ {
|
||||
+ ret = hdbc->pSQLErrorW(SQL_NULL_HENV, hdbc->driver_hdbc, SQL_NULL_HSTMT, Sqlstate,
|
||||
+ NativeError, MessageText, BufferLength, TextLength);
|
||||
+ }
|
||||
+ }
|
||||
+ else if (HandleType == SQL_HANDLE_STMT)
|
||||
+ {
|
||||
+ struct SQLHSTMT_data *statement = Handle;
|
||||
+
|
||||
+ if (statement->connection->pSQLGetDiagRecW)
|
||||
+ {
|
||||
+ ret = statement->connection->pSQLGetDiagRecW(HandleType, statement->driver_stmt, RecNumber,
|
||||
+ Sqlstate, NativeError, MessageText, BufferLength, TextLength);
|
||||
+ }
|
||||
+ else if (statement->connection->pSQLErrorW)
|
||||
+ {
|
||||
+ ret = statement->connection->pSQLErrorW(SQL_NULL_HENV, SQL_NULL_HDBC, statement->driver_stmt,
|
||||
+ Sqlstate, NativeError, MessageText, BufferLength, TextLength);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (ret != SQL_ERROR)
|
||||
@@ -50,5 +64,5 @@ index c73912b38cf..bdd8361d221 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.39.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,29 +1,27 @@
|
||||
From 51a3447adf38839ab44b8b7e91baf5de66055125 Mon Sep 17 00:00:00 2001
|
||||
From b05ebe79d74d84c7354cecb3072812697839a61f Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 8 Feb 2023 09:03:40 +1100
|
||||
Subject: [PATCH 39/42] odbc32: Pass ODBC version when creating driver
|
||||
environment
|
||||
Subject: odbc32: Pass ODBC version when creating driver environment
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 46872add8b0..851d2535ca1 100644
|
||||
index d590a5af0fe..389148b625a 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -2552,6 +2552,11 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
||||
@@ -2644,11 +2644,15 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
||||
if (connection->pSQLAllocHandle)
|
||||
{
|
||||
connection->pSQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &connection->driver_env);
|
||||
+
|
||||
- connection->pSQLAllocHandle(SQL_HANDLE_DBC, connection->driver_env, &connection->driver_hdbc);
|
||||
|
||||
if (connection->pSQLGetEnvAttr)
|
||||
connection->pSQLGetEnvAttr(connection->driver_env, SQL_ATTR_ODBC_VERSION, &connection->driver_ver, 0, NULL);
|
||||
|
||||
+ if (connection->pSQLSetEnvAttr)
|
||||
+ connection->pSQLSetEnvAttr(connection->driver_env, SQL_ATTR_ODBC_VERSION,
|
||||
+ (SQLPOINTER)connection->environment->version, 0);
|
||||
+
|
||||
connection->pSQLAllocHandle(SQL_HANDLE_DBC, connection->driver_env, &connection->driver_hdbc);
|
||||
+ connection->pSQLAllocHandle(SQL_HANDLE_DBC, connection->driver_env, &connection->driver_hdbc);
|
||||
}
|
||||
|
||||
--
|
||||
2.39.1
|
||||
|
||||
/* ODBC 2.x */
|
||||
else if(connection->pSQLAllocConnect && connection->pSQLAllocEnv)
|
||||
|
@@ -1,17 +1,54 @@
|
||||
From 5e0d8ba8d698d404b1b16076a76cbb3e17b616c0 Mon Sep 17 00:00:00 2001
|
||||
From d3bfdb5fc584ae6a2bab70056f0cad11e4b741cd Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 8 Feb 2023 20:19:44 +1100
|
||||
Subject: [PATCH] odbc32: Forward SQLColAttribute/W request onto driver
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 32 ++++++++++++++++++++++++++++++--
|
||||
1 file changed, 30 insertions(+), 2 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 119 ++++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 102 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 6f6d502e772..d33dbac8b2b 100644
|
||||
index 3eca2ce9999..25e8249f8fc 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -566,12 +566,26 @@ SQLRETURN WINAPI SQLColAttribute(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu
|
||||
@@ -314,6 +314,36 @@ static void connection_bind_sql_funcs(struct SQLHDBC_data *connection)
|
||||
LOAD_FUNCPTR(SQLTransact);
|
||||
}
|
||||
|
||||
+static SQLINTEGER map_odbc2_to_3(SQLINTEGER fieldid)
|
||||
+{
|
||||
+ switch( fieldid )
|
||||
+ {
|
||||
+ case SQL_COLUMN_COUNT:
|
||||
+ return SQL_DESC_COUNT;
|
||||
+ case SQL_COLUMN_NULLABLE:
|
||||
+ return SQL_DESC_NULLABLE;
|
||||
+ case SQL_COLUMN_NAME:
|
||||
+ return SQL_DESC_NAME;
|
||||
+ default:
|
||||
+ return fieldid;
|
||||
+ }
|
||||
+}
|
||||
+static SQLINTEGER map_odbc3_to_2(SQLINTEGER fieldid)
|
||||
+{
|
||||
+ switch( fieldid )
|
||||
+ {
|
||||
+ case SQL_DESC_COUNT:
|
||||
+ return SQL_COLUMN_COUNT;
|
||||
+ case SQL_DESC_NULLABLE:
|
||||
+ return SQL_COLUMN_NULLABLE;
|
||||
+ case SQL_DESC_NAME:
|
||||
+ return SQL_COLUMN_NAME;
|
||||
+ default:
|
||||
+ return fieldid;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
/*************************************************************************
|
||||
* SQLAllocConnect [ODBC32.001]
|
||||
*/
|
||||
@@ -557,12 +587,47 @@ SQLRETURN WINAPI SQLColAttribute(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNu
|
||||
SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
|
||||
SQLLEN *NumericAttribute)
|
||||
{
|
||||
@@ -29,17 +66,60 @@ index 6f6d502e772..d33dbac8b2b 100644
|
||||
+ return SQL_ERROR;
|
||||
+ }
|
||||
+
|
||||
+ /* ODBC 3.0 */
|
||||
+ if (statement->connection->pSQLColAttribute)
|
||||
+ {
|
||||
+ ret = statement->connection->pSQLColAttribute(statement->driver_stmt, ColumnNumber, FieldIdentifier,
|
||||
+ CharacterAttribute, BufferLength, StringLength, NumericAttribute);
|
||||
+ }
|
||||
+ /* ODBC 2.0 */
|
||||
+ else if (statement->connection->pSQLColAttributes)
|
||||
+ {
|
||||
+ FieldIdentifier = map_odbc3_to_2(FieldIdentifier);
|
||||
+ ret = statement->connection->pSQLColAttributes(statement->driver_stmt, ColumnNumber, FieldIdentifier,
|
||||
+ CharacterAttribute, BufferLength, StringLength, NumericAttribute);
|
||||
+
|
||||
+ /* Convert back for ODBC3 drivers */
|
||||
+ if (NumericAttribute && FieldIdentifier == SQL_COLUMN_TYPE &&
|
||||
+ statement->connection->driver_ver == SQL_OV_ODBC2 &&
|
||||
+ statement->connection->environment->version == SQL_OV_ODBC3)
|
||||
+ {
|
||||
+ if (*NumericAttribute == SQL_TIME)
|
||||
+ *NumericAttribute = SQL_TYPE_TIME;
|
||||
+ else if (*NumericAttribute == SQL_DATETIME)
|
||||
+ *NumericAttribute = SQL_TYPE_DATE;
|
||||
+ else if (*NumericAttribute == SQL_TIMESTAMP)
|
||||
+ *NumericAttribute = SQL_TYPE_TIMESTAMP;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ TRACE("ret %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2230,12 +2244,26 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN
|
||||
@@ -2063,21 +2128,6 @@ SQLRETURN WINAPI SQLSetScrollOptions(SQLHSTMT statement_handle, SQLUSMALLINT f_c
|
||||
return ret;
|
||||
}
|
||||
|
||||
-static SQLINTEGER map_odbc2_to_3(SQLINTEGER fieldid)
|
||||
-{
|
||||
- switch( fieldid )
|
||||
- {
|
||||
- case SQL_COLUMN_COUNT:
|
||||
- return SQL_DESC_COUNT;
|
||||
- case SQL_COLUMN_NULLABLE:
|
||||
- return SQL_DESC_NULLABLE;
|
||||
- case SQL_COLUMN_NAME:
|
||||
- return SQL_DESC_NAME;
|
||||
- default:
|
||||
- return fieldid;
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/*************************************************************************
|
||||
* SQLColAttributesW [ODBC32.106]
|
||||
*/
|
||||
@@ -2284,12 +2334,47 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN
|
||||
SQLSMALLINT BufferLength, SQLSMALLINT *StringLength,
|
||||
SQLLEN *NumericAttribute)
|
||||
{
|
||||
@@ -57,16 +137,37 @@ index 6f6d502e772..d33dbac8b2b 100644
|
||||
+ return SQL_ERROR;
|
||||
+ }
|
||||
+
|
||||
+ /* ODBC 3.0 */
|
||||
+ if (statement->connection->pSQLColAttributeW)
|
||||
+ {
|
||||
+ ret = statement->connection->pSQLColAttributeW(statement->driver_stmt, ColumnNumber, FieldIdentifier,
|
||||
+ CharacterAttribute, BufferLength, StringLength, NumericAttribute);
|
||||
+ }
|
||||
+ /* ODBC 2.0 */
|
||||
+ else if (statement->connection->pSQLColAttributesW)
|
||||
+ {
|
||||
+ FieldIdentifier = map_odbc3_to_2(FieldIdentifier);
|
||||
+ ret = statement->connection->pSQLColAttributesW(statement->driver_stmt, ColumnNumber, FieldIdentifier,
|
||||
+ CharacterAttribute, BufferLength, StringLength, NumericAttribute);
|
||||
+
|
||||
+ /* Convert back for ODBC3 drivers */
|
||||
+ if (NumericAttribute && FieldIdentifier == SQL_COLUMN_TYPE &&
|
||||
+ statement->connection->driver_ver == SQL_OV_ODBC2 &&
|
||||
+ statement->connection->environment->version == SQL_OV_ODBC3)
|
||||
+ {
|
||||
+ if (*NumericAttribute == SQL_TIME)
|
||||
+ *NumericAttribute = SQL_TYPE_TIME;
|
||||
+ else if (*NumericAttribute == SQL_DATETIME)
|
||||
+ *NumericAttribute = SQL_TYPE_DATE;
|
||||
+ else if (*NumericAttribute == SQL_TIMESTAMP)
|
||||
+ *NumericAttribute = SQL_TYPE_TIMESTAMP;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ TRACE("ret %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
--
|
||||
2.39.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,17 +1,17 @@
|
||||
From 5188be5a843ab3d340dd3b5b92e1448e27bf0104 Mon Sep 17 00:00:00 2001
|
||||
From 2d319fb624bf217beded8f6e40b942331ea7670d Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 8 Feb 2023 21:03:47 +1100
|
||||
Subject: [PATCH] odbc32: Forward SQLGetDiagRec request to driver
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 62 +++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 60 insertions(+), 2 deletions(-)
|
||||
dlls/odbc32/proxyodbc.c | 34 +++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 4b276b63803..f4798febbf1 100644
|
||||
index 5389579d3ae..ab843b9ecb9 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -1068,10 +1068,42 @@ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMAL
|
||||
@@ -3147,9 +3147,41 @@ SQLRETURN WINAPI SQLGetDiagRecA(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA
|
||||
{
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
|
||||
@@ -51,47 +51,9 @@ index 4b276b63803..f4798febbf1 100644
|
||||
+ {
|
||||
+ TRACE("%d: %s %s\n", RecNumber, Sqlstate, MessageText);
|
||||
+ }
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -3030,9 +3062,35 @@ SQLRETURN WINAPI SQLGetDiagRecA(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA
|
||||
{
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
|
||||
- FIXME("(HandleType %d, Handle %p, RecNumber %d, Sqlstate %p, NativeError %p, MessageText %p, BufferLength %d,"
|
||||
+ TRACE("(HandleType %d, Handle %p, RecNumber %d, Sqlstate %p, NativeError %p, MessageText %p, BufferLength %d,"
|
||||
" TextLength %p)\n", HandleType, Handle, RecNumber, Sqlstate, NativeError, MessageText, BufferLength,
|
||||
TextLength);
|
||||
|
||||
+ if (HandleType == SQL_HANDLE_ENV)
|
||||
+ {
|
||||
+ FIXME("Unhandled SQL_HANDLE_ENV records\n");
|
||||
+ }
|
||||
+ else if (HandleType == SQL_HANDLE_DBC)
|
||||
+ {
|
||||
+ struct SQLHDBC_data *hdbc = Handle;
|
||||
+
|
||||
+ if (hdbc->pSQLGetDiagRecA)
|
||||
+ ret = hdbc->pSQLGetDiagRecA(HandleType, hdbc->driver_hdbc, RecNumber, Sqlstate,
|
||||
+ NativeError, MessageText, BufferLength, TextLength);
|
||||
+ }
|
||||
+ else if (HandleType == SQL_HANDLE_STMT)
|
||||
+ {
|
||||
+ struct SQLHSTMT_data *statement = Handle;
|
||||
+
|
||||
+ if (statement->connection->pSQLGetDiagRecA)
|
||||
+ ret = statement->connection->pSQLGetDiagRecA(HandleType, statement->driver_stmt, RecNumber,
|
||||
+ Sqlstate, NativeError, MessageText, BufferLength, TextLength);
|
||||
+ }
|
||||
+
|
||||
+ if (ret != SQL_ERROR)
|
||||
+ {
|
||||
+ TRACE("%d: %s %s\n", RecNumber, Sqlstate, MessageText);
|
||||
+ }
|
||||
+
|
||||
return ret;
|
||||
}
|
||||
--
|
||||
2.42.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