From bdd0224945ecea9b4489f78bb881fdc4eff53e4a Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 7 Apr 2005 18:01:29 +0000 Subject: [PATCH] forward CommConfigDialogA to CommConfigDialogW svn path=/trunk/; revision=14537 --- reactos/lib/kernel32/misc/comm.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/reactos/lib/kernel32/misc/comm.c b/reactos/lib/kernel32/misc/comm.c index 7c1d89a0f75..0f0c9f5c7d8 100644 --- a/reactos/lib/kernel32/misc/comm.c +++ b/reactos/lib/kernel32/misc/comm.c @@ -831,28 +831,20 @@ BOOL STDCALL CommConfigDialogA(LPCSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC) { - BOOL (STDCALL *drvCommDlgA)(LPCSTR, HWND, LPCOMMCONFIG); - HMODULE hSerialuiDll; + PWCHAR NameW; BOOL result; - //FIXME: Get dll name from registry. (setupapi needed) - if(!(hSerialuiDll = LoadLibraryW(L"serialui.dll"))) + /* don't use the static thread buffer so operations in serialui + don't overwrite the string */ + if(!(NameW = FilenameA2W(lpszName, TRUE))) { - DPRINT("CommConfigDialogA: serialui.dll not found.\n"); return FALSE; } - drvCommDlgA = GetProcAddress(hSerialuiDll, "drvCommConfigDialogA"); + result = CommConfigDialogW(NameW, hWnd, lpCC); + + RtlFreeHeap(RtlGetProcessHeap(), 0, NameW); - if(!drvCommDlgA) - { - DPRINT("CommConfigDialogA: serialui does not export drvCommConfigDialogA\n"); - FreeLibrary(hSerialuiDll); - return FALSE; - } - - result = drvCommDlgA(lpszName, hWnd, lpCC); - FreeLibrary(hSerialuiDll); return result; }