forward CommConfigDialogA to CommConfigDialogW

svn path=/trunk/; revision=14537
This commit is contained in:
Thomas Bluemel 2005-04-07 18:01:29 +00:00
parent 2acf2098b8
commit bdd0224945

View file

@ -831,28 +831,20 @@ BOOL
STDCALL STDCALL
CommConfigDialogA(LPCSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC) CommConfigDialogA(LPCSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC)
{ {
BOOL (STDCALL *drvCommDlgA)(LPCSTR, HWND, LPCOMMCONFIG); PWCHAR NameW;
HMODULE hSerialuiDll;
BOOL result; BOOL result;
//FIXME: Get dll name from registry. (setupapi needed) /* don't use the static thread buffer so operations in serialui
if(!(hSerialuiDll = LoadLibraryW(L"serialui.dll"))) don't overwrite the string */
if(!(NameW = FilenameA2W(lpszName, TRUE)))
{ {
DPRINT("CommConfigDialogA: serialui.dll not found.\n");
return FALSE; return FALSE;
} }
drvCommDlgA = GetProcAddress(hSerialuiDll, "drvCommConfigDialogA"); result = CommConfigDialogW(NameW, hWnd, lpCC);
if(!drvCommDlgA) RtlFreeHeap(RtlGetProcessHeap(), 0, NameW);
{
DPRINT("CommConfigDialogA: serialui does not export drvCommConfigDialogA\n");
FreeLibrary(hSerialuiDll);
return FALSE;
}
result = drvCommDlgA(lpszName, hWnd, lpCC);
FreeLibrary(hSerialuiDll);
return result; return result;
} }