wine-staging/patches/odbc-remove-unixodbc/0042-odbc32-Implement-SQLAllocHandle.patch

41 lines
1.2 KiB
Diff
Raw Normal View History

From 0a67d651b40335e9b8ee09e47c8f54845101c6f7 Mon Sep 17 00:00:00 2001
2023-02-16 15:44:46 -08:00
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 8 Feb 2023 15:22:00 +1100
Subject: [PATCH] odbc32: Implement SQLAllocHandle
2023-02-16 15:44:46 -08:00
---
dlls/odbc32/proxyodbc.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
index d760481fa9b..879808add00 100644
2023-02-16 15:44:46 -08:00
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -374,9 +374,22 @@ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, S
2023-02-16 15:44:46 -08:00
{
SQLRETURN ret = SQL_ERROR;
- FIXME("(HandleType %d, InputHandle %p, OutputHandle %p)\n", HandleType, InputHandle, OutputHandle);
+ TRACE("(HandleType %d, InputHandle %p, OutputHandle %p)\n", HandleType, InputHandle, OutputHandle);
*OutputHandle = 0;
+ if (HandleType == SQL_HANDLE_ENV)
+ {
+ ret = SQLAllocEnv(OutputHandle);
+ }
+ else if (HandleType == SQL_HANDLE_DBC)
+ {
+ ret = SQLAllocConnect(InputHandle, OutputHandle);
+ }
+ else if (HandleType == SQL_HANDLE_STMT)
+ {
+ ret = SQLAllocStmt(InputHandle, OutputHandle);
+ }
+
return ret;
}
--
2.43.0
2023-02-16 15:44:46 -08:00