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
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a442564f05 | ||
|
ad13b6a9e1 | ||
|
12fb6d73ff | ||
|
1f498520be | ||
|
d2c868d8c9 | ||
|
f58c6016bd | ||
|
e479cad86f | ||
|
4f00617d21 | ||
|
0e802db66f | ||
|
0d4b9f2f62 | ||
|
d1f022f686 |
@@ -1,4 +1,4 @@
|
||||
From f48fa2ff628c3262245593301a141dee31118fd4 Mon Sep 17 00:00:00 2001
|
||||
From 6a4be6a3089d37ff825853d2644d826d80d59e4f Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 2 Oct 2014 19:44:31 +0200
|
||||
Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH] ntdll: Print a warning message specifying the wine-staging
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 021f7941969..68cb4b25d85 100644
|
||||
index bad1492e138..6f80e7b3a28 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -42,6 +42,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
@@ -43,6 +43,7 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(snoop);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(loaddll);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(imports);
|
||||
@@ -20,7 +20,7 @@ index 021f7941969..68cb4b25d85 100644
|
||||
|
||||
#ifdef _WIN64
|
||||
#define DEFAULT_SECURITY_COOKIE_64 (((ULONGLONG)0x00002b99 << 32) | 0x2ddfa232)
|
||||
@@ -3822,6 +3823,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
@@ -3823,6 +3824,7 @@ void WINAPI LdrShutdownProcess(void)
|
||||
process_detach();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ index 021f7941969..68cb4b25d85 100644
|
||||
|
||||
/******************************************************************
|
||||
* RtlExitUserProcess (NTDLL.@)
|
||||
@@ -4244,6 +4246,9 @@ static void release_address_space(void)
|
||||
@@ -4317,6 +4319,9 @@ static void release_address_space(void)
|
||||
*/
|
||||
void loader_init( CONTEXT *context, void **entry )
|
||||
{
|
||||
@@ -38,9 +38,9 @@ index 021f7941969..68cb4b25d85 100644
|
||||
static int attach_done;
|
||||
NTSTATUS status;
|
||||
ULONG_PTR cookie, port = 0;
|
||||
@@ -4317,6 +4322,16 @@ void loader_init( CONTEXT *context, void **entry )
|
||||
if (NtCurrentTeb()->WowTebOffset) init_wow64( context );
|
||||
#endif
|
||||
@@ -4397,6 +4402,16 @@ void loader_init( CONTEXT *context, void **entry )
|
||||
wm = get_modref( NtCurrentTeb()->Peb->ImageBaseAddress );
|
||||
}
|
||||
|
||||
+ RtlInitUnicodeString( &staging_event_string, L"\\__wine_staging_warn_event" );
|
||||
+ InitializeObjectAttributes( &staging_event_attr, &staging_event_string, OBJ_OPENIF, NULL, NULL );
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 1e7b6a812b248a8344076a402fc97bd60da495d1 Mon Sep 17 00:00:00 2001
|
||||
From 0173ca4b3352506b76801619ae5a05f338d6ff6e 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
|
||||
@@ -15,10 +15,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36646
|
||||
1 file changed, 102 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
|
||||
index 12d3db1b012..0f222f3640b 100644
|
||||
index ce48b16d7ec..2d20ee299fa 100644
|
||||
--- a/programs/cmd/wcmdmain.c
|
||||
+++ b/programs/cmd/wcmdmain.c
|
||||
@@ -1494,8 +1494,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
@@ -1541,8 +1541,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 12d3db1b012..0f222f3640b 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1525,6 +1527,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
@@ -1572,6 +1574,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
}
|
||||
|
||||
if (GetFileAttributesW(thisDir) != INVALID_FILE_ATTRIBUTES) {
|
||||
@@ -38,17 +38,17 @@ index 12d3db1b012..0f222f3640b 100644
|
||||
found = TRUE;
|
||||
thisExt = NULL;
|
||||
}
|
||||
@@ -1546,6 +1549,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
/* Special case BAT and CMD */
|
||||
if (ext && (!wcsicmp(ext, L".bat") || !wcsicmp(ext, L".cmd"))) {
|
||||
@@ -1595,6 +1598,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
RETURN_CODE return_code;
|
||||
BOOL oldinteractive = interactive;
|
||||
|
||||
+ WINE_TRACE("Calling batch program\n");
|
||||
interactive = FALSE;
|
||||
WCMD_batch(thisDir, command, NULL, INVALID_HANDLE_VALUE);
|
||||
return_code = WCMD_batch(thisDir, command, NULL, INVALID_HANDLE_VALUE);
|
||||
interactive = oldinteractive;
|
||||
@@ -1554,48 +1558,109 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
context->skip_rest = TRUE;
|
||||
}
|
||||
@@ -1605,48 +1609,109 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
if (return_code != RETURN_CODE_ABORTED && return_code != RETURN_CODE_OLD_CHAINING)
|
||||
errorlevel = return_code;
|
||||
return;
|
||||
- } else {
|
||||
- DWORD exit_code;
|
||||
@@ -193,5 +193,5 @@ index 12d3db1b012..0f222f3640b 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.43.0
|
||||
2.45.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From bbd077ad0ba63001b1a785c2b3c740b5b01d3469 Mon Sep 17 00:00:00 2001
|
||||
From 5d1a7ff33160080ad2aca22f689c5b4b446837d8 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 18 Jun 2024 09:14:56 +1000
|
||||
Subject: [PATCH] cmd: Changed errorlevel type to DWORD
|
||||
@@ -12,23 +12,23 @@ as an error with clang/mingw in the latest version.
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
|
||||
index f98ac902eba..147f94ac4bb 100644
|
||||
index 1e92e88d191..9b8cfd389b9 100644
|
||||
--- a/programs/cmd/builtins.c
|
||||
+++ b/programs/cmd/builtins.c
|
||||
@@ -440,7 +440,7 @@ void WCMD_choice (const WCHAR * args) {
|
||||
@@ -442,7 +442,7 @@ RETURN_CODE WCMD_choice (const WCHAR * args)
|
||||
SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), oldmode);
|
||||
|
||||
errorlevel = (ptr - opt_c) + 1;
|
||||
- TRACE("answer: %d\n", errorlevel);
|
||||
+ TRACE("answer: %ld\n", errorlevel);
|
||||
free(my_command);
|
||||
return;
|
||||
return errorlevel;
|
||||
}
|
||||
diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h
|
||||
index dde5d1e12ec..f202e6ef9e4 100644
|
||||
index 6c76070338c..d750aca5572 100644
|
||||
--- a/programs/cmd/wcmd.h
|
||||
+++ b/programs/cmd/wcmd.h
|
||||
@@ -306,7 +306,7 @@ void WCMD_set_for_loop_variable(int var_idx, const WCHAR *value);
|
||||
@@ -336,7 +336,7 @@ void WCMD_set_for_loop_variable(int var_idx, const WCHAR *value);
|
||||
* variables and batch parameters substitution already done.
|
||||
*/
|
||||
extern WCHAR quals[MAXSTRING], param1[MAXSTRING], param2[MAXSTRING];
|
||||
@@ -38,7 +38,7 @@ index dde5d1e12ec..f202e6ef9e4 100644
|
||||
extern FOR_CONTEXT *forloopcontext;
|
||||
extern BOOL delayedsubst;
|
||||
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
|
||||
index 702c3657a2b..0f8bdd3df14 100644
|
||||
index 2df0d7c53d3..095be784f2c 100644
|
||||
--- a/programs/cmd/wcmdmain.c
|
||||
+++ b/programs/cmd/wcmdmain.c
|
||||
@@ -36,7 +36,7 @@ extern const WCHAR inbuilt[][10];
|
||||
|
@@ -1 +1,2 @@
|
||||
Fixes: [18154] cmd: Support for launching programs based on file association
|
||||
Disabled: True
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From f6d47bb4eb5747fde7059271a560268080756791 Mon Sep 17 00:00:00 2001
|
||||
From 96af775034dae1c0b133b315c45b7172090d3498 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
|
||||
@@ -6,15 +6,15 @@ Subject: [PATCH] d3dx9_36: Improve D3DXSaveTextureToFile to save simple
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/d3dx9_private.h | 2 ++
|
||||
dlls/d3dx9_36/surface.c | 62 +++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/surface.c | 63 +++++++++++++++++++++++++++++++++++
|
||||
dlls/d3dx9_36/texture.c | 5 +--
|
||||
3 files changed, 65 insertions(+), 4 deletions(-)
|
||||
3 files changed, 66 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_private.h b/dlls/d3dx9_36/d3dx9_private.h
|
||||
index 001a7f26f4f..b322765d164 100644
|
||||
index 34a9f6eec7f..878dff3fc01 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_private.h
|
||||
+++ b/dlls/d3dx9_36/d3dx9_private.h
|
||||
@@ -182,6 +182,8 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
|
||||
@@ -178,6 +178,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);
|
||||
@@ -24,10 +24,10 @@ index 001a7f26f4f..b322765d164 100644
|
||||
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 fb49ca5665a..2a8bd97fe2d 100644
|
||||
index 31bce97bbab..212d452c654 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -560,6 +560,68 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
@@ -574,6 +574,69 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -93,14 +93,15 @@ index fb49ca5665a..2a8bd97fe2d 100644
|
||||
+
|
||||
+ return hr;
|
||||
+}
|
||||
HRESULT load_volume_from_dds(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *dst_palette,
|
||||
const D3DBOX *dst_box, const void *src_data, const D3DBOX *src_box, DWORD filter, D3DCOLOR color_key,
|
||||
const D3DXIMAGE_INFO *src_info)
|
||||
+
|
||||
HRESULT load_cube_texture_from_dds(IDirect3DCubeTexture9 *cube_texture, const void *src_data,
|
||||
const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info)
|
||||
{
|
||||
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
|
||||
index 52cfb1e8c34..ccbe1fcef20 100644
|
||||
index b42c9db3f2d..d84bac25cfe 100644
|
||||
--- a/dlls/d3dx9_36/texture.c
|
||||
+++ b/dlls/d3dx9_36/texture.c
|
||||
@@ -1858,10 +1858,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
|
||||
@@ -1847,10 +1847,7 @@ HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
|
||||
if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL;
|
||||
|
||||
if (file_format == D3DXIFF_DDS)
|
||||
@@ -113,5 +114,5 @@ index 52cfb1e8c34..ccbe1fcef20 100644
|
||||
type = IDirect3DBaseTexture9_GetType(src_texture);
|
||||
switch (type)
|
||||
--
|
||||
2.43.0
|
||||
2.45.2
|
||||
|
||||
|
@@ -1,28 +1,30 @@
|
||||
From cdced5d4d89a932fa456191551899e1919a1881e Mon Sep 17 00:00:00 2001
|
||||
From f0ff0cdc5472deafb8c75f3d0d6456ddb4164878 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().
|
||||
|
||||
---
|
||||
dlls/ntdll/unix/esync.c | 170 ++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/unix/esync.c | 172 ++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/unix/esync.h | 3 +
|
||||
dlls/ntdll/unix/sync.c | 7 ++
|
||||
3 files changed, 180 insertions(+)
|
||||
3 files changed, 182 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index e031e9cb94f..75ceb95bc66 100644
|
||||
index e031e9cb94f..f383221194c 100644
|
||||
--- a/dlls/ntdll/unix/esync.c
|
||||
+++ b/dlls/ntdll/unix/esync.c
|
||||
@@ -22,6 +22,8 @@
|
||||
@@ -22,6 +22,10 @@
|
||||
#pragma makedep unix
|
||||
#endif
|
||||
|
||||
+#ifndef _GNU_SOURCE
|
||||
+#define _GNU_SOURCE
|
||||
+#endif
|
||||
+
|
||||
#include "config.h"
|
||||
|
||||
#include <assert.h>
|
||||
@@ -34,6 +36,12 @@
|
||||
@@ -34,6 +38,12 @@
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
@@ -35,7 +37,7 @@ index e031e9cb94f..75ceb95bc66 100644
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -286,6 +294,168 @@ NTSTATUS esync_release_semaphore( HANDLE handle, ULONG count, ULONG *prev )
|
||||
@@ -286,6 +296,168 @@ NTSTATUS esync_release_semaphore( HANDLE handle, ULONG count, ULONG *prev )
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -219,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 c85f985b4f3..79141999e33 100644
|
||||
index 76da038649f..1c60cd11f77 100644
|
||||
--- a/dlls/ntdll/unix/sync.c
|
||||
+++ b/dlls/ntdll/unix/sync.c
|
||||
@@ -1479,6 +1479,13 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, BO
|
||||
@@ -1524,6 +1524,13 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles, BO
|
||||
|
||||
if (!count || count > MAXIMUM_WAIT_OBJECTS) return STATUS_INVALID_PARAMETER_1;
|
||||
|
||||
@@ -237,5 +239,5 @@ index c85f985b4f3..79141999e33 100644
|
||||
select_op.wait.op = wait_any ? SELECT_WAIT : SELECT_WAIT_ALL;
|
||||
for (i = 0; i < count; i++) select_op.wait.handles[i] = wine_server_obj_handle( handles[i] );
|
||||
--
|
||||
2.42.0
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From f1fcc584ff2bb975656b9f2f111d3e09b36293d0 Mon Sep 17 00:00:00 2001
|
||||
From 27e2bc1b0d098abce9168ea46589024054817e25 Mon Sep 17 00:00:00 2001
|
||||
From: Zebediah Figura <zfigura@codeweavers.com>
|
||||
Date: Mon, 6 Jul 2020 16:01:56 -0500
|
||||
Subject: [PATCH] server: Create eventfd file descriptors for message queues.
|
||||
@@ -8,7 +8,7 @@ Subject: [PATCH] server: Create eventfd file descriptors for message queues.
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 4d3f43b8d52..74a59b2ee84 100644
|
||||
index ee575724e4e..60f0c043257 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -44,6 +44,7 @@
|
||||
@@ -19,7 +19,7 @@ index 4d3f43b8d52..74a59b2ee84 100644
|
||||
|
||||
#define WM_NCMOUSEFIRST WM_NCMOUSEMOVE
|
||||
#define WM_NCMOUSELAST (WM_NCMOUSEFIRST+(WM_MOUSELAST-WM_MOUSEFIRST))
|
||||
@@ -148,6 +149,7 @@ struct msg_queue
|
||||
@@ -144,6 +145,7 @@ struct msg_queue
|
||||
int keystate_lock; /* owns an input keystate lock */
|
||||
const queue_shm_t *shared; /* queue in session shared memory */
|
||||
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
|
||||
@@ -27,7 +27,7 @@ index 4d3f43b8d52..74a59b2ee84 100644
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -164,6 +166,7 @@ static void msg_queue_dump( struct object *obj, int verbose );
|
||||
@@ -160,6 +162,7 @@ static void msg_queue_dump( struct object *obj, int verbose );
|
||||
static int msg_queue_add_queue( struct object *obj, struct wait_queue_entry *entry );
|
||||
static void msg_queue_remove_queue( struct object *obj, struct wait_queue_entry *entry );
|
||||
static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entry );
|
||||
@@ -35,7 +35,7 @@ index 4d3f43b8d52..74a59b2ee84 100644
|
||||
static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry );
|
||||
static void msg_queue_destroy( struct object *obj );
|
||||
static void msg_queue_poll_event( struct fd *fd, int event );
|
||||
@@ -179,7 +182,7 @@ static const struct object_ops msg_queue_ops =
|
||||
@@ -175,7 +178,7 @@ static const struct object_ops msg_queue_ops =
|
||||
msg_queue_add_queue, /* add_queue */
|
||||
msg_queue_remove_queue, /* remove_queue */
|
||||
msg_queue_signaled, /* signaled */
|
||||
@@ -44,7 +44,7 @@ index 4d3f43b8d52..74a59b2ee84 100644
|
||||
msg_queue_satisfied, /* satisfied */
|
||||
no_signal, /* signal */
|
||||
no_get_fd, /* get_fd */
|
||||
@@ -321,6 +324,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -313,6 +316,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
queue->last_get_msg = current_time;
|
||||
queue->keystate_lock = 0;
|
||||
queue->ignore_post_msg = 0;
|
||||
@@ -52,7 +52,7 @@ index 4d3f43b8d52..74a59b2ee84 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -339,6 +343,9 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -335,6 +339,9 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
}
|
||||
SHARED_WRITE_END;
|
||||
|
||||
@@ -62,7 +62,7 @@ index 4d3f43b8d52..74a59b2ee84 100644
|
||||
thread->queue = queue;
|
||||
|
||||
if ((desktop = get_thread_desktop( thread, 0 )))
|
||||
@@ -672,6 +679,9 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits
|
||||
@@ -685,6 +692,9 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits
|
||||
if (queue->keystate_lock) unlock_input_keystate( queue->input );
|
||||
queue->keystate_lock = 0;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ index 4d3f43b8d52..74a59b2ee84 100644
|
||||
}
|
||||
|
||||
/* check if message is matched by the filter */
|
||||
@@ -1213,6 +1223,13 @@ static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entr
|
||||
@@ -1227,6 +1237,13 @@ static int msg_queue_signaled( struct object *obj, struct wait_queue_entry *entr
|
||||
return ret || is_signaled( queue );
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ index 4d3f43b8d52..74a59b2ee84 100644
|
||||
static void msg_queue_satisfied( struct object *obj, struct wait_queue_entry *entry )
|
||||
{
|
||||
struct msg_queue *queue = (struct msg_queue *)obj;
|
||||
@@ -1258,6 +1275,7 @@ static void msg_queue_destroy( struct object *obj )
|
||||
@@ -1278,6 +1295,7 @@ static void msg_queue_destroy( struct object *obj )
|
||||
if (queue->hooks) release_object( queue->hooks );
|
||||
if (queue->fd) release_object( queue->fd );
|
||||
if (queue->shared) free_shared_object( queue->shared );
|
||||
@@ -94,8 +94,8 @@ index 4d3f43b8d52..74a59b2ee84 100644
|
||||
}
|
||||
|
||||
static void msg_queue_poll_event( struct fd *fd, int event )
|
||||
@@ -2962,6 +2980,9 @@ DECL_HANDLER(set_queue_mask)
|
||||
if (req->skip_wait) queue->wake_mask = queue->changed_mask = 0;
|
||||
@@ -3000,6 +3018,9 @@ DECL_HANDLER(set_queue_mask)
|
||||
}
|
||||
else wake_up( &queue->obj, 0 );
|
||||
}
|
||||
+
|
||||
@@ -104,19 +104,19 @@ index 4d3f43b8d52..74a59b2ee84 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2975,6 +2996,9 @@ DECL_HANDLER(get_queue_status)
|
||||
reply->wake_bits = queue->wake_bits;
|
||||
reply->changed_bits = queue->changed_bits;
|
||||
queue->changed_bits &= ~req->clear_bits;
|
||||
@@ -3020,6 +3041,9 @@ DECL_HANDLER(get_queue_status)
|
||||
shared->changed_bits &= ~req->clear_bits;
|
||||
}
|
||||
SHARED_WRITE_END;
|
||||
+
|
||||
+ if (do_esync() && !is_signaled( queue ))
|
||||
+ esync_clear( queue->esync_fd );
|
||||
}
|
||||
else reply->wake_bits = reply->changed_bits = 0;
|
||||
}
|
||||
@@ -3229,6 +3253,10 @@ DECL_HANDLER(get_message)
|
||||
queue->wake_mask = req->wake_mask;
|
||||
queue->changed_mask = req->changed_mask;
|
||||
@@ -3286,6 +3310,10 @@ DECL_HANDLER(get_message)
|
||||
SHARED_WRITE_END;
|
||||
|
||||
set_error( STATUS_PENDING ); /* FIXME */
|
||||
+
|
||||
+ if (do_esync() && !is_signaled( queue ))
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 57703c0423cf2b138b93dfaf4bd993d50235e55a Mon Sep 17 00:00:00 2001
|
||||
From 7522f4cf4bb29413bce97be5e61ebaefb5276c77 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 | 4 ++++
|
||||
server/queue.c | 22 ++++++++++++++++++
|
||||
3 files changed, 75 insertions(+), 2 deletions(-)
|
||||
server/queue.c | 24 +++++++++++++++++++
|
||||
3 files changed, 77 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/esync.c b/dlls/ntdll/unix/esync.c
|
||||
index 399930c444b..06d7d8babc6 100644
|
||||
@@ -105,10 +105,10 @@ index 399930c444b..06d7d8babc6 100644
|
||||
{
|
||||
struct stat st;
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index d4a7173776f..4a081973ca5 100644
|
||||
index 56f2d263100..46cdbbed9b7 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3964,6 +3964,10 @@ enum esync_type
|
||||
@@ -3968,6 +3968,10 @@ enum esync_type
|
||||
unsigned int shm_idx;
|
||||
@END
|
||||
|
||||
@@ -120,10 +120,10 @@ index d4a7173776f..4a081973ca5 100644
|
||||
@REQ(set_keyboard_repeat)
|
||||
int enable; /* whether to enable auto-repeat */
|
||||
diff --git a/server/queue.c b/server/queue.c
|
||||
index 6183c2fa686..260fb753799 100644
|
||||
index 60f0c043257..d6b6f2f20aa 100644
|
||||
--- a/server/queue.c
|
||||
+++ b/server/queue.c
|
||||
@@ -150,6 +150,7 @@ struct msg_queue
|
||||
@@ -146,6 +146,7 @@ struct msg_queue
|
||||
const queue_shm_t *shared; /* queue in session shared memory */
|
||||
unsigned int ignore_post_msg; /* ignore post messages newer than this unique id */
|
||||
int esync_fd; /* esync file descriptor (signalled on message) */
|
||||
@@ -131,7 +131,7 @@ index 6183c2fa686..260fb753799 100644
|
||||
};
|
||||
|
||||
struct hotkey
|
||||
@@ -325,6 +326,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
|
||||
@@ -317,6 +318,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;
|
||||
@@ -139,7 +139,7 @@ index 6183c2fa686..260fb753799 100644
|
||||
list_init( &queue->send_result );
|
||||
list_init( &queue->callback_result );
|
||||
list_init( &queue->pending_timers );
|
||||
@@ -1170,6 +1172,10 @@ static int is_queue_hung( struct msg_queue *queue )
|
||||
@@ -1183,6 +1185,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 */
|
||||
}
|
||||
@@ -150,18 +150,20 @@ index 6183c2fa686..260fb753799 100644
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4025,6 +4031,21 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
@@ -4079,6 +4085,23 @@ DECL_HANDLER(update_rawinput_devices)
|
||||
}
|
||||
}
|
||||
|
||||
+DECL_HANDLER(esync_msgwait)
|
||||
+{
|
||||
+ struct msg_queue *queue = get_current_queue();
|
||||
+ const queue_shm_t *queue_shm;
|
||||
+
|
||||
+ if (!queue) return;
|
||||
+ queue_shm = queue->shared;
|
||||
+ queue->esync_in_msgwait = req->in_msgwait;
|
||||
+
|
||||
+ if (current->process->idle_event && !(queue->wake_mask & QS_SMRESULT))
|
||||
+ if (current->process->idle_event && !(queue_shm->wake_mask & QS_SMRESULT))
|
||||
+ set_event( current->process->idle_event );
|
||||
+
|
||||
+ /* and start/stop waiting on the driver */
|
||||
@@ -172,7 +174,7 @@ index 6183c2fa686..260fb753799 100644
|
||||
DECL_HANDLER(set_keyboard_repeat)
|
||||
{
|
||||
struct desktop *desktop;
|
||||
@@ -4043,3 +4064,4 @@ DECL_HANDLER(set_keyboard_repeat)
|
||||
@@ -4097,3 +4120,4 @@ DECL_HANDLER(set_keyboard_repeat)
|
||||
|
||||
release_object( desktop );
|
||||
}
|
||||
|
@@ -1,18 +1,24 @@
|
||||
From 5dcb80fe0d35101804bb978e507e6db361a949af Mon Sep 17 00:00:00 2001
|
||||
From fdc9d34400af31765d20ca7b070e53d7eec710e4 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wendt <daniel.wendt@linux.com>
|
||||
Date: Tue, 10 Dec 2013 14:55:32 +0100
|
||||
Subject: [PATCH] gdi32: fix for rotated ellipse
|
||||
|
||||
Bug: http://bugs.winehq.org/show_bug.cgi?id=35331
|
||||
---
|
||||
dlls/win32u/dibdrv/graphics.c | 60 ++++++++++++++++++++++++-----------
|
||||
1 file changed, 42 insertions(+), 18 deletions(-)
|
||||
dlls/win32u/dibdrv/graphics.c | 63 ++++++++++++++++++++++++-----------
|
||||
1 file changed, 44 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/dlls/win32u/dibdrv/graphics.c b/dlls/win32u/dibdrv/graphics.c
|
||||
index 3a6f8184009..b5231636261 100644
|
||||
index 21d2eabbc9e..1eeea1d68ea 100644
|
||||
--- a/dlls/win32u/dibdrv/graphics.c
|
||||
+++ b/dlls/win32u/dibdrv/graphics.c
|
||||
@@ -1535,6 +1535,23 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
|
||||
@@ -1531,10 +1531,28 @@ BOOL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
||||
DC *dc = get_physdev_dc( dev );
|
||||
RECT rect;
|
||||
POINT pt[2], *points;
|
||||
- int i, end, count;
|
||||
+ int i, end;
|
||||
+ ULONG count;
|
||||
BOOL ret = TRUE;
|
||||
HRGN outline = 0, interior = 0;
|
||||
|
||||
@@ -36,7 +42,7 @@ index 3a6f8184009..b5231636261 100644
|
||||
if (!get_pen_device_rect( dc, pdev, &rect, left, top, right, bottom )) return TRUE;
|
||||
|
||||
pt[0].x = pt[0].y = 0;
|
||||
@@ -1555,23 +1572,6 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
|
||||
@@ -1555,23 +1573,6 @@ BOOL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -60,7 +66,7 @@ index 3a6f8184009..b5231636261 100644
|
||||
count = ellipse_first_quadrant( ellipse_width, ellipse_height, points );
|
||||
|
||||
if (dc->attr->arc_direction == AD_CLOCKWISE)
|
||||
@@ -1615,13 +1615,37 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
|
||||
@@ -1615,13 +1616,37 @@ BOOL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
||||
}
|
||||
count = end + 1;
|
||||
|
||||
@@ -74,7 +80,7 @@ index 3a6f8184009..b5231636261 100644
|
||||
+ }
|
||||
+
|
||||
+ if (pdev->brush.style != BS_NULL &&
|
||||
+ !(interior = ULongToHandle(NtGdiPolyPolyDraw( ULongToHandle(ALTERNATE), points, (const UINT *)&count, 1, NtGdiPolyPolygonRgn ))))
|
||||
+ !(interior = ULongToHandle(NtGdiPolyPolyDraw( ULongToHandle(ALTERNATE), points, &count, 1, NtGdiPolyPolygonRgn ))))
|
||||
+ {
|
||||
+ free( points );
|
||||
+ if (outline) NtGdiDeleteObjectApp( outline );
|
||||
@@ -100,5 +106,5 @@ index 3a6f8184009..b5231636261 100644
|
||||
NtGdiDeleteObjectApp( interior );
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 48cbd1c62bb0d2945334dfea222a7e19ea149c64 Mon Sep 17 00:00:00 2001
|
||||
From be1665ad0d88598c409f6a1d699562c2dd0d525a Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Wed, 29 May 2019 16:01:45 -0600
|
||||
Subject: wcmd: Add junction point support to mklink.
|
||||
Subject: [PATCH] wcmd: Add junction point support to mklink.
|
||||
|
||||
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
---
|
||||
@@ -9,7 +9,7 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
|
||||
1 file changed, 47 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
|
||||
index dd3ae5b509b..53734b1e940 100644
|
||||
index 5b15c0f397a..6d7512275ce 100644
|
||||
--- a/programs/cmd/builtins.c
|
||||
+++ b/programs/cmd/builtins.c
|
||||
@@ -31,6 +31,9 @@
|
||||
@@ -22,8 +22,8 @@ index dd3ae5b509b..53734b1e940 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(cmd);
|
||||
|
||||
@@ -4997,6 +5000,49 @@ void WCMD_color (void) {
|
||||
}
|
||||
@@ -4091,6 +4094,49 @@ RETURN_CODE WCMD_color(void)
|
||||
return errorlevel = return_code;
|
||||
}
|
||||
|
||||
+BOOL WCMD_create_junction(WCHAR *link, WCHAR *target) {
|
||||
@@ -72,15 +72,15 @@ index dd3ae5b509b..53734b1e940 100644
|
||||
/****************************************************************************
|
||||
* WCMD_mklink
|
||||
*/
|
||||
@@ -5045,7 +5091,7 @@ void WCMD_mklink(WCHAR *args)
|
||||
else if(!junction)
|
||||
ret = CreateSymbolicLinkW(file1, file2, isdir);
|
||||
else
|
||||
- WINE_TRACE("Juction links currently not supported.\n");
|
||||
+ ret = WCMD_create_junction(file1, file2);
|
||||
@@ -4141,7 +4187,7 @@ RETURN_CODE WCMD_mklink(WCHAR *args)
|
||||
else if(!junction)
|
||||
ret = CreateSymbolicLinkW(file1, file2, isdir);
|
||||
else
|
||||
- TRACE("Junction links currently not supported.\n");
|
||||
+ ret = WCMD_create_junction(file1, file2);
|
||||
}
|
||||
|
||||
if(!ret)
|
||||
WCMD_output_stderr(WCMD_LoadMessage(WCMD_READFAIL), file1);
|
||||
if (ret) return errorlevel = NO_ERROR;
|
||||
--
|
||||
2.17.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 52baf4b2f68a78a2d0a0ad16fac8e25af70400ff Mon Sep 17 00:00:00 2001
|
||||
From b083e23347c3f50112410d1c886eb17c75f34a4e Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Wesie <awesie@gmail.com>
|
||||
Date: Fri, 24 Apr 2020 14:55:17 -0500
|
||||
Subject: [PATCH] ntdll: Report unmodified WRITECOPY pages as shared.
|
||||
@@ -13,10 +13,10 @@ Signed-off-by: Andrew Wesie <awesie@gmail.com>
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/unix/virtual.c b/dlls/ntdll/unix/virtual.c
|
||||
index 6c530304442..05d4d517aeb 100644
|
||||
index b3d8b2f7a95..568a0cef74c 100644
|
||||
--- a/dlls/ntdll/unix/virtual.c
|
||||
+++ b/dlls/ntdll/unix/virtual.c
|
||||
@@ -2441,6 +2441,8 @@ static NTSTATUS map_image_into_view( struct file_view *view, const WCHAR *filena
|
||||
@@ -2897,6 +2897,8 @@ static NTSTATUS map_image_into_view( struct file_view *view, const WCHAR *filena
|
||||
ptr + sec->VirtualAddress + file_size,
|
||||
ptr + sec->VirtualAddress + end );
|
||||
memset( ptr + sec->VirtualAddress + file_size, 0, end - file_size );
|
||||
@@ -25,15 +25,15 @@ index 6c530304442..05d4d517aeb 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4420,7 +4422,7 @@ static NTSTATUS get_working_set_ex( HANDLE process, LPCVOID addr,
|
||||
}
|
||||
@@ -5326,7 +5328,7 @@ static void fill_working_set_info( struct fill_working_set_info_data *d, struct
|
||||
pagemap = d->pm_buffer[page - d->buffer_start];
|
||||
|
||||
p->VirtualAttributes.Valid = !(vprot & VPROT_GUARD) && (vprot & 0x0f) && (pagemap >> 63);
|
||||
- p->VirtualAttributes.Shared = !is_view_valloc( view ) && ((pagemap >> 61) & 1);
|
||||
+ p->VirtualAttributes.Shared = (!is_view_valloc( view ) && ((pagemap >> 61) & 1)) || ((view->protect & VPROT_WRITECOPY) && !(vprot & VPROT_WRITTEN));
|
||||
if (p->VirtualAttributes.Shared && p->VirtualAttributes.Valid)
|
||||
p->VirtualAttributes.ShareCount = 1; /* FIXME */
|
||||
if (p->VirtualAttributes.Valid)
|
||||
p->VirtualAttributes.Valid = !(vprot & VPROT_GUARD) && (vprot & 0x0f) && (pagemap >> 63);
|
||||
- p->VirtualAttributes.Shared = !is_view_valloc( view ) && ((pagemap >> 61) & 1);
|
||||
+ p->VirtualAttributes.Shared = (!is_view_valloc( view ) && ((pagemap >> 61) & 1)) || ((view->protect & VPROT_WRITECOPY) && !(vprot & VPROT_WRITTEN));
|
||||
if (p->VirtualAttributes.Shared && p->VirtualAttributes.Valid)
|
||||
p->VirtualAttributes.ShareCount = 1; /* FIXME */
|
||||
if (p->VirtualAttributes.Valid)
|
||||
--
|
||||
2.35.1
|
||||
2.43.0
|
||||
|
||||
|
@@ -1 +1,2 @@
|
||||
Fixes: [54499] Support native ODBC drivers.
|
||||
Disabled: True
|
||||
|
@@ -0,0 +1,46 @@
|
||||
From 45cc0ee874528258d34e21063cf514ccf40a9865 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] odbc32: SQLFreeHandle handle ODBC v2 drivers
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 23 ++++++++++++++++++++++-
|
||||
1 file changed, 22 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 957584af008..9a4f08440ea 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -1454,7 +1454,28 @@ SQLRETURN WINAPI SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLFreeHandle( HandleType, handle->win32_handle );
|
||||
+ if (handle->win32_funcs->SQLFreeHandle)
|
||||
+ {
|
||||
+ ret = handle->win32_funcs->SQLFreeHandle( HandleType, handle->win32_handle );
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ if (HandleType == SQL_HANDLE_DBC)
|
||||
+ {
|
||||
+ if (handle->win32_funcs->SQLFreeConnect)
|
||||
+ ret = handle->win32_funcs->SQLFreeConnect(handle->win32_handle);
|
||||
+ else
|
||||
+ ERR("Failed to free connection HANDLE\n");
|
||||
+ }
|
||||
+ else if (HandleType == SQL_HANDLE_STMT)
|
||||
+ {
|
||||
+ if (handle->win32_funcs->SQLFreeStmt)
|
||||
+ ret = handle->win32_funcs->SQLFreeStmt(handle->win32_handle, SQL_CLOSE);
|
||||
+ else
|
||||
+ ERR("Failed to free statement HANDLE\n");
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
RegCloseKey( handle->drivers_key );
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -0,0 +1,230 @@
|
||||
From 9a04cd1f7199385e7521fd77f1118682e50192cf 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
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 97 +++++++++++++++++++++++++++++++----------
|
||||
1 file changed, 74 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 9a4f08440ea..c19d401168b 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -753,11 +753,20 @@ static WCHAR *strdupAW( const char *src )
|
||||
return dst;
|
||||
}
|
||||
|
||||
-static HKEY open_odbcini_key( HKEY root )
|
||||
+static HKEY open_odbcini_key( HKEY root, BOOL use_dsn )
|
||||
{
|
||||
static const WCHAR sourcesW[] = L"Software\\ODBC\\ODBC.INI";
|
||||
+ static const WCHAR driversW[] = L"Software\\ODBC\\ODBCINST.INI";
|
||||
HKEY key;
|
||||
- if (!RegCreateKeyExW( root, sourcesW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL )) return key;
|
||||
+
|
||||
+ if (use_dsn)
|
||||
+ {
|
||||
+ if (!RegCreateKeyExW( root, sourcesW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL )) return key;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (!RegCreateKeyExW( root, driversW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &key, NULL )) return key;
|
||||
+ }
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -771,12 +780,12 @@ static WCHAR *get_reg_value( HKEY key, const WCHAR *name )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-static WCHAR *get_driver_filename( const SQLWCHAR *source )
|
||||
+static WCHAR *get_driver_filename( const SQLWCHAR *source, BOOL use_dsn )
|
||||
{
|
||||
HKEY key_root, key_source;
|
||||
WCHAR *ret = NULL;
|
||||
|
||||
- if (!(key_root = open_odbcini_key( HKEY_CURRENT_USER ))) return NULL;
|
||||
+ if (!(key_root = open_odbcini_key( HKEY_CURRENT_USER, use_dsn ))) return NULL;
|
||||
if (!RegOpenKeyExW( key_root, source, 0, KEY_READ, &key_source ))
|
||||
{
|
||||
ret = get_reg_value( key_source, L"Driver" );
|
||||
@@ -785,7 +794,7 @@ static WCHAR *get_driver_filename( const SQLWCHAR *source )
|
||||
RegCloseKey( key_root );
|
||||
if (ret) return ret;
|
||||
|
||||
- if (!(key_root = open_odbcini_key( HKEY_LOCAL_MACHINE ))) return NULL;
|
||||
+ if (!(key_root = open_odbcini_key( HKEY_LOCAL_MACHINE, use_dsn ))) return NULL;
|
||||
if (!RegOpenKeyExW( key_root, source, 0, KEY_READ, &key_source ))
|
||||
{
|
||||
ret = get_reg_value( key_source, L"Driver" );
|
||||
@@ -919,7 +928,7 @@ SQLRETURN WINAPI SQLConnect(SQLHDBC ConnectionHandle, SQLCHAR *ServerName, SQLSM
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
- if (!servername || !(filename = get_driver_filename( servername )))
|
||||
+ if (!servername || !(filename = get_driver_filename( servername, TRUE )))
|
||||
{
|
||||
WARN( "can't find driver filename\n" );
|
||||
goto done;
|
||||
@@ -2650,6 +2659,32 @@ static WCHAR *get_datasource( const WCHAR *connection_string )
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static WCHAR *get_driver( const WCHAR *connection_string )
|
||||
+{
|
||||
+ const WCHAR *p = connection_string, *q;
|
||||
+ WCHAR *ret = NULL;
|
||||
+ unsigned int len;
|
||||
+
|
||||
+ if (!p) return NULL;
|
||||
+ while (*p)
|
||||
+ {
|
||||
+ if (!wcsnicmp( p, L"DRIVER=", 7 ))
|
||||
+ {
|
||||
+ p += 7;
|
||||
+ q = wcschr( p, ';' );
|
||||
+ len = q ? (q - p) : wcslen( p );
|
||||
+ if ((ret = malloc( (len + 1) * sizeof(WCHAR) )))
|
||||
+ {
|
||||
+ memcpy( ret, p, len * sizeof(WCHAR) );
|
||||
+ ret[len] = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ p++;
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/*************************************************************************
|
||||
* SQLBrowseConnect [ODBC32.055]
|
||||
*/
|
||||
@@ -2659,6 +2694,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;
|
||||
+ BOOL use_dsn = TRUE;
|
||||
|
||||
TRACE("(ConnectionHandle %p, InConnectionString %s, StringLength1 %d, OutConnectionString %p, BufferLength, %d, "
|
||||
"StringLength2 %p)\n", ConnectionHandle, debugstr_an((const char *)InConnectionString, StringLength1),
|
||||
@@ -2666,13 +2702,16 @@ SQLRETURN WINAPI SQLBrowseConnect(SQLHDBC ConnectionHandle, SQLCHAR *InConnectio
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
- /* FIXME: try DRIVER attribute if DSN is absent */
|
||||
if (!connection_string || !(datasource = get_datasource( connection_string )))
|
||||
{
|
||||
- WARN( "can't find data source\n" );
|
||||
- goto done;
|
||||
+ use_dsn = FALSE;
|
||||
+ if (!(datasource = get_driver( connection_string )))
|
||||
+ {
|
||||
+ WARN( "can't find data source\n" );
|
||||
+ goto done;
|
||||
+ }
|
||||
}
|
||||
- if (!(filename = get_driver_filename( datasource )))
|
||||
+ if (!(filename = get_driver_filename( datasource, use_dsn )))
|
||||
{
|
||||
WARN( "can't find driver filename\n" );
|
||||
goto done;
|
||||
@@ -3319,6 +3358,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;
|
||||
+ BOOL use_dsn = TRUE;
|
||||
|
||||
TRACE("(ConnectionHandle %p, WindowHandle %p, InConnectionString %s, Length %d, OutConnectionString, %p,"
|
||||
" BufferLength, %d, Length2 %p, DriverCompletion %d)\n", ConnectionHandle, WindowHandle,
|
||||
@@ -3327,13 +3367,16 @@ SQLRETURN WINAPI SQLDriverConnect(SQLHDBC ConnectionHandle, SQLHWND WindowHandle
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
- /* FIXME: try DRIVER attribute if DSN is absent */
|
||||
if (!connection_string || !(datasource = get_datasource( connection_string )))
|
||||
{
|
||||
- WARN( "can't find data source\n" );
|
||||
- goto done;
|
||||
+ use_dsn = FALSE;
|
||||
+ if (!(datasource = get_driver( connection_string )))
|
||||
+ {
|
||||
+ WARN( "can't find data source\n" );
|
||||
+ goto done;
|
||||
+ }
|
||||
}
|
||||
- if (!(filename = get_driver_filename( datasource )))
|
||||
+ if (!(filename = get_driver_filename( datasource, use_dsn )))
|
||||
{
|
||||
WARN( "can't find driver filename\n" );
|
||||
goto done;
|
||||
@@ -3490,7 +3533,7 @@ SQLRETURN WINAPI SQLConnectW(SQLHDBC ConnectionHandle, WCHAR *ServerName, SQLSMA
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
- if (!(filename = get_driver_filename( ServerName )))
|
||||
+ if (!(filename = get_driver_filename( ServerName, TRUE )))
|
||||
{
|
||||
WARN( "can't find driver filename\n" );
|
||||
goto done;
|
||||
@@ -4056,6 +4099,7 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
||||
struct handle *handle = ConnectionHandle;
|
||||
WCHAR *datasource, *filename = NULL;
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
+ BOOL use_dsn = TRUE;
|
||||
|
||||
TRACE("(ConnectionHandle %p, WindowHandle %p, InConnectionString %s, Length %d, OutConnectionString %p,"
|
||||
" BufferLength %d, Length2 %p, DriverCompletion %d)\n", ConnectionHandle, WindowHandle,
|
||||
@@ -4064,13 +4108,16 @@ SQLRETURN WINAPI SQLDriverConnectW(SQLHDBC ConnectionHandle, SQLHWND WindowHandl
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
- /* FIXME: try DRIVER attribute if DSN is absent */
|
||||
if (!(datasource = get_datasource( InConnectionString )))
|
||||
{
|
||||
- WARN( "can't find data source\n" );
|
||||
- goto done;
|
||||
+ use_dsn = FALSE;
|
||||
+ if (!(datasource = get_driver( InConnectionString )))
|
||||
+ {
|
||||
+ WARN( "can't find data source\n" );
|
||||
+ goto done;
|
||||
+ }
|
||||
}
|
||||
- if (!(filename = get_driver_filename( datasource )))
|
||||
+ if (!(filename = get_driver_filename( datasource, use_dsn )))
|
||||
{
|
||||
WARN( "can't find driver filename\n" );
|
||||
goto done;
|
||||
@@ -4346,6 +4393,7 @@ SQLRETURN WINAPI SQLBrowseConnectW(SQLHDBC ConnectionHandle, SQLWCHAR *InConnect
|
||||
struct handle *handle = ConnectionHandle;
|
||||
WCHAR *datasource, *filename = NULL;
|
||||
SQLRETURN ret = SQL_ERROR;
|
||||
+ BOOL use_dsn = TRUE;
|
||||
|
||||
TRACE("(ConnectionHandle %p, InConnectionString %s, StringLength1 %d, OutConnectionString %p, BufferLength %d, "
|
||||
"StringLength2 %p)\n", ConnectionHandle, debugstr_wn(InConnectionString, StringLength1), StringLength1,
|
||||
@@ -4353,13 +4401,16 @@ SQLRETURN WINAPI SQLBrowseConnectW(SQLHDBC ConnectionHandle, SQLWCHAR *InConnect
|
||||
|
||||
if (!handle) return SQL_INVALID_HANDLE;
|
||||
|
||||
- /* FIXME: try DRIVER attribute if DSN is absent */
|
||||
if (!(datasource = get_datasource( InConnectionString )))
|
||||
{
|
||||
- WARN( "can't find data source\n" );
|
||||
- goto done;
|
||||
+ use_dsn = FALSE;
|
||||
+ if (!(datasource = get_driver( InConnectionString )))
|
||||
+ {
|
||||
+ WARN( "can't find data source\n" );
|
||||
+ goto done;
|
||||
+ }
|
||||
}
|
||||
- if (!(filename = get_driver_filename( datasource )))
|
||||
+ if (!(filename = get_driver_filename( datasource, use_dsn )))
|
||||
{
|
||||
WARN( "can't find driver filename\n" );
|
||||
goto done;
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -0,0 +1,58 @@
|
||||
From a9f272e877306607e502a268cb232609f56eed85 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] odbc32: SQLColAttributeW support fallback function
|
||||
|
||||
---
|
||||
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 c19d401168b..3ccb331a6be 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -3758,6 +3758,21 @@ SQLRETURN WINAPI SQLSetCursorNameW(SQLHSTMT StatementHandle, WCHAR *CursorName,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+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;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/*************************************************************************
|
||||
* SQLColAttributeW [ODBC32.127]
|
||||
*/
|
||||
@@ -3792,9 +3807,18 @@ SQLRETURN WINAPI SQLColAttributeW(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnN
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLColAttributeW( handle->win32_handle, ColumnNumber, FieldIdentifier,
|
||||
+ if (handle->win32_funcs->SQLColAttributeW)
|
||||
+ ret = handle->win32_funcs->SQLColAttributeW( handle->win32_handle, ColumnNumber, FieldIdentifier,
|
||||
CharacterAttribute, BufferLength, StringLength,
|
||||
NumericAttribute );
|
||||
+ else if(handle->win32_funcs->SQLColAttributesW)
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ FieldIdentifier = map_odbc3_to_2(FieldIdentifier);
|
||||
+ ret = handle->win32_funcs->SQLColAttributesW( handle->win32_handle, ColumnNumber, FieldIdentifier,
|
||||
+ CharacterAttribute, BufferLength, StringLength,
|
||||
+ NumericAttribute );
|
||||
+ }
|
||||
}
|
||||
|
||||
TRACE("Returning %d\n", ret);
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -0,0 +1,62 @@
|
||||
From fda9d9bf29a6d1a3091dc648be8702b8b2b5cd99 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:23:01 +1000
|
||||
Subject: [PATCH] odbc32: SQLError/W handle NULL handles
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 32 ++++++++++++++++++++++++++------
|
||||
1 file changed, 26 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 3ccb331a6be..31a789b26a4 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -1191,8 +1191,19 @@ SQLRETURN WINAPI SQLError(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle, S
|
||||
}
|
||||
else if ((env && env->win32_handle) || (con && con->win32_handle) || (stmt && stmt->win32_handle))
|
||||
{
|
||||
- ret = env->win32_funcs->SQLError( env->win32_handle, con->win32_handle, stmt->win32_handle, SqlState,
|
||||
- NativeError, MessageText, BufferLength, TextLength );
|
||||
+ const struct win32_funcs *win32_funcs = NULL;
|
||||
+
|
||||
+ if (env) win32_funcs = env->win32_funcs;
|
||||
+ else if (con) win32_funcs = con->win32_funcs;
|
||||
+ else if (stmt) win32_funcs = con->win32_funcs;
|
||||
+
|
||||
+ if(win32_funcs)
|
||||
+ ret = win32_funcs->SQLError( env ? env->win32_handle : NULL,
|
||||
+ con ? con->win32_handle : NULL,
|
||||
+ stmt ? stmt->win32_handle : NULL,
|
||||
+ SqlState, NativeError, MessageText, BufferLength, TextLength );
|
||||
+ else
|
||||
+ ERR("No function map found\n");
|
||||
}
|
||||
|
||||
if (SUCCESS( ret ))
|
||||
@@ -3633,10 +3644,19 @@ SQLRETURN WINAPI SQLErrorW(SQLHENV EnvironmentHandle, SQLHDBC ConnectionHandle,
|
||||
}
|
||||
else if ((env && env->win32_handle) || (con && con->win32_handle) || (stmt && stmt->win32_handle))
|
||||
{
|
||||
- ret = env->win32_funcs->SQLErrorW( env ? env->win32_handle : NULL,
|
||||
- con ? con->win32_handle : NULL,
|
||||
- stmt ? stmt->win32_handle : NULL,
|
||||
- SqlState, NativeError, MessageText, BufferLength, TextLength );
|
||||
+ const struct win32_funcs *win32_funcs = NULL;
|
||||
+
|
||||
+ if (env) win32_funcs = env->win32_funcs;
|
||||
+ else if (con) win32_funcs = con->win32_funcs;
|
||||
+ else if (stmt) win32_funcs = con->win32_funcs;
|
||||
+
|
||||
+ if(win32_funcs)
|
||||
+ ret = win32_funcs->SQLErrorW( env ? env->win32_handle : NULL,
|
||||
+ con ? con->win32_handle : NULL,
|
||||
+ stmt ? stmt->win32_handle : NULL,
|
||||
+ SqlState, NativeError, MessageText, BufferLength, TextLength );
|
||||
+ else
|
||||
+ ERR("No function map found\n");
|
||||
}
|
||||
|
||||
if (SUCCESS(ret ))
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -0,0 +1,68 @@
|
||||
From e934286dc1be469392c92cbca9d862d33edfd9e7 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:29:17 +1000
|
||||
Subject: [PATCH] odbc32: SQLGetDiagRec/W handle fallback function
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 37 ++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 34 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 31a789b26a4..e955c5f86f7 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -1807,8 +1807,23 @@ SQLRETURN WINAPI SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMAL
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLGetDiagRec( HandleType, handle->win32_handle, RecNumber, SqlState, NativeError,
|
||||
+ if (handle->win32_funcs->SQLGetDiagRec)
|
||||
+ {
|
||||
+ ret = handle->win32_funcs->SQLGetDiagRec( HandleType, handle->win32_handle, RecNumber, SqlState, NativeError,
|
||||
MessageText, BufferLength, TextLength );
|
||||
+ }
|
||||
+ else if (handle->win32_funcs->SQLError)
|
||||
+ {
|
||||
+ if (HandleType == SQL_HANDLE_ENV)
|
||||
+ ret = handle->win32_funcs->SQLError(handle->win32_handle, SQL_NULL_HDBC, SQL_NULL_HSTMT,
|
||||
+ SqlState, NativeError, MessageText, BufferLength, TextLength);
|
||||
+ else if (HandleType == SQL_HANDLE_DBC)
|
||||
+ ret = handle->win32_funcs->SQLError(SQL_NULL_HENV, handle->win32_handle, SQL_NULL_HSTMT,
|
||||
+ SqlState, NativeError, MessageText, BufferLength, TextLength);
|
||||
+ else if (HandleType == SQL_HANDLE_STMT)
|
||||
+ ret = handle->win32_funcs->SQLError(SQL_NULL_HENV, SQL_NULL_HDBC, handle->win32_handle,
|
||||
+ SqlState, NativeError, MessageText, BufferLength, TextLength);
|
||||
+ }
|
||||
}
|
||||
|
||||
TRACE("Returning %d\n", ret);
|
||||
@@ -4012,8 +4027,24 @@ SQLRETURN WINAPI SQLGetDiagRecW(SQLSMALLINT HandleType, SQLHANDLE Handle, SQLSMA
|
||||
}
|
||||
else if (handle->win32_handle)
|
||||
{
|
||||
- ret = handle->win32_funcs->SQLGetDiagRecW( HandleType, handle->win32_handle, RecNumber, SqlState, NativeError,
|
||||
- MessageText, BufferLength, TextLength );
|
||||
+ if (handle->win32_funcs->SQLGetDiagRecW)
|
||||
+ {
|
||||
+ ret = handle->win32_funcs->SQLGetDiagRecW( HandleType, handle->win32_handle, RecNumber, SqlState,
|
||||
+ NativeError, MessageText, BufferLength, TextLength );
|
||||
+ }
|
||||
+ else if (handle->win32_funcs->SQLErrorW)
|
||||
+ {
|
||||
+ /* ODBC v2 */
|
||||
+ if (HandleType == SQL_HANDLE_ENV)
|
||||
+ ret = handle->win32_funcs->SQLErrorW(handle->win32_handle, SQL_NULL_HDBC, SQL_NULL_HSTMT,
|
||||
+ SqlState, NativeError, MessageText, BufferLength, TextLength);
|
||||
+ else if (HandleType == SQL_HANDLE_DBC)
|
||||
+ ret = handle->win32_funcs->SQLErrorW(SQL_NULL_HENV, handle->win32_handle, SQL_NULL_HSTMT,
|
||||
+ SqlState, NativeError, MessageText, BufferLength, TextLength);
|
||||
+ else if (HandleType == SQL_HANDLE_STMT)
|
||||
+ ret = handle->win32_funcs->SQLErrorW(SQL_NULL_HENV, SQL_NULL_HDBC, handle->win32_handle,
|
||||
+ SqlState, NativeError, MessageText, BufferLength, TextLength);
|
||||
+ }
|
||||
}
|
||||
|
||||
TRACE("Returning %d\n", ret);
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -0,0 +1,32 @@
|
||||
From 55817c84c2be5c143788b820d5cdf37e7eee3199 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 12 Jul 2024 14:44:43 +1000
|
||||
Subject: [PATCH] odbc32: Load function pointer for SQLBindParam
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index e955c5f86f7..d218efb9545 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -50,6 +50,7 @@ struct win32_funcs
|
||||
SQLRETURN WINAPI (*SQLAllocHandleStd)(SQLSMALLINT,SQLHANDLE,SQLHANDLE*);
|
||||
SQLRETURN WINAPI (*SQLAllocStmt)(SQLHDBC,SQLHSTMT*);
|
||||
SQLRETURN WINAPI (*SQLBindCol)(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLPOINTER,SQLLEN,SQLLEN*);
|
||||
+ SQLRETURN WINAPI (*SQLBindParam)(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLULEN,SQLSMALLINT,SQLPOINTER,SQLLEN*);
|
||||
SQLRETURN WINAPI (*SQLBindParameter)(SQLHSTMT,SQLUSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLSMALLINT,SQLULEN,
|
||||
SQLSMALLINT,SQLPOINTER,SQLLEN,SQLLEN*);
|
||||
SQLRETURN WINAPI (*SQLBrowseConnect)(SQLHDBC,SQLCHAR*,SQLSMALLINT,SQLCHAR*,SQLSMALLINT,SQLSMALLINT*);
|
||||
@@ -206,6 +207,7 @@ static BOOL load_function_table( HMODULE module, struct win32_driver *driver )
|
||||
LOAD_FUNCPTR( SQLAllocHandleStd )
|
||||
LOAD_FUNCPTR( SQLAllocStmt )
|
||||
LOAD_FUNCPTR( SQLBindCol )
|
||||
+ LOAD_FUNCPTR( SQLBindParam )
|
||||
LOAD_FUNCPTR( SQLBindParameter )
|
||||
LOAD_FUNCPTR( SQLBrowseConnect )
|
||||
LOAD_FUNCPTR( SQLBrowseConnectW )
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -0,0 +1,52 @@
|
||||
From eb9fa655f1a1a6f209763e13ba7ee192cdc59be3 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] odbc32: SQLBindParameter handle fallback function
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 27 ++++++++++++++++++++++++++-
|
||||
1 file changed, 26 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index d218efb9545..11fcbe97be8 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -3367,9 +3367,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;
|
||||
+
|
||||
+ /* 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;;;
|
||||
+
|
||||
+ ret = handle->win32_funcs->SQLBindParam(handle->win32_handle, ParameterNumber, ValueType, ParameterType,
|
||||
+ ColumnSize, DecimalDigits, ParameterValue, StrLen_or_Ind);
|
||||
+ }
|
||||
}
|
||||
|
||||
TRACE("Returning %d\n", ret);
|
||||
--
|
||||
2.43.0
|
||||
|
@@ -0,0 +1,46 @@
|
||||
From 2834d453dab7a66f3d16bada6c295a828d14d4f0 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] odbc32: SQLSetConnectAttr/W handle fallback function
|
||||
|
||||
---
|
||||
dlls/odbc32/proxyodbc.c | 16 ++++++++++++++--
|
||||
1 file changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
|
||||
index 11fcbe97be8..1c92560d7ee 100644
|
||||
--- a/dlls/odbc32/proxyodbc.c
|
||||
+++ b/dlls/odbc32/proxyodbc.c
|
||||
@@ -2194,7 +2194,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
|
||||
{
|
||||
@@ -4133,7 +4139,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
|
||||
{
|
||||
--
|
||||
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