From 0a67d651b40335e9b8ee09e47c8f54845101c6f7 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Wed, 8 Feb 2023 15:22:00 +1100 Subject: [PATCH] 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 d760481fa9b..879808add00 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -374,9 +374,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.43.0