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

41 lines
1.2 KiB
Diff
Raw Normal View History

2023-02-16 15:44:46 -08:00
From dca052a02225fb151237d0ba36dbf35d3fdab4fe Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 8 Feb 2023 15:22:00 +1100
Subject: [PATCH 41/42] odbc32: Implement SQLAllocHandle
---
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 c6d19b58e1c..15171a0d028 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -383,9 +383,22 @@ SQLRETURN WINAPI SQLAllocHandle(SQLSMALLINT HandleType, SQLHANDLE InputHandle, S
{
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.39.1