added UpdateDriverForPlugAndPlayDevicesA (untested)
Modified: trunk/reactos/lib/newdev/newdev.c
Modified: trunk/reactos/lib/newdev/stubs.c

Modified: trunk/reactos/lib/newdev/newdev.c
--- trunk/reactos/lib/newdev/newdev.c	2005-11-16 13:24:13 UTC (rev 19263)
+++ trunk/reactos/lib/newdev/newdev.c	2005-11-16 14:57:50 UTC (rev 19264)
@@ -22,6 +22,68 @@
 HINSTANCE hDllInstance;
 HANDLE hThread;
 
+/*
+* @unimplemented
+*/
+BOOL WINAPI
+UpdateDriverForPlugAndPlayDevicesW(
+            IN HWND hwndParent,
+            IN LPCWSTR HardwareId,
+            IN LPCWSTR FullInfPath,
+            IN DWORD InstallFlags,
+            OUT PBOOL bRebootRequired OPTIONAL)
+{
+    UNIMPLEMENTED;
+    SetLastError(ERROR_GEN_FAILURE);
+    return FALSE;
+}
+
+/*
+* @implemented
+*/
+BOOL WINAPI
+UpdateDriverForPlugAndPlayDevicesA(
+               IN HWND hwndParent,
+               IN LPCSTR HardwareId,
+               IN LPCSTR FullInfPath,
+               IN DWORD InstallFlags,
+               OUT PBOOL bRebootRequired OPTIONAL)
+{
+    BOOL Result;
+    LPWSTR HardwareIdW = NULL;
+    LPWSTR FullInfPathW = NULL;
+
+    int len = MultiByteToWideChar(CP_ACP, 0, HardwareId, -1, NULL, 0);
+    HardwareIdW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+    if (!HardwareIdW)
+    {
+        SetLastError(ERROR_GEN_FAILURE);
+        return FALSE;
+    }
+    MultiByteToWideChar(CP_ACP, 0, HardwareId, -1, HardwareIdW, len);
+
+    len = MultiByteToWideChar(CP_ACP, 0, FullInfPath, -1, NULL, 0);
+    FullInfPathW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+    if (!FullInfPathW)
+    {
+        SetLastError(ERROR_GEN_FAILURE);
+        return FALSE;
+    }
+    MultiByteToWideChar(CP_ACP, 0, FullInfPath, -1, FullInfPathW, len);
+
+    Result = UpdateDriverForPlugAndPlayDevicesW(hwndParent,
+        HardwareIdW,
+        FullInfPathW,
+        InstallFlags,
+        bRebootRequired);
+
+    HeapFree(GetProcessHeap(), 0, HardwareIdW);
+    HeapFree(GetProcessHeap(), 0, FullInfPathW);
+
+    return Result;
+}
+
+
 static HFONT
 CreateTitleFont(VOID)
 {

Modified: trunk/reactos/lib/newdev/stubs.c
--- trunk/reactos/lib/newdev/stubs.c	2005-11-16 13:24:13 UTC (rev 19263)
+++ trunk/reactos/lib/newdev/stubs.c	2005-11-16 14:57:50 UTC (rev 19264)
@@ -36,29 +36,6 @@
 	return FALSE;
 }
 
-BOOL WINAPI
-UpdateDriverForPlugAndPlayDevicesA(
-	IN HWND hwndParent,
-	IN LPCSTR HardwareId,
-	IN LPCSTR FullInfPath,
-	IN DWORD InstallFlags,
-	OUT PBOOL bRebootRequired OPTIONAL)
-{
-	UNIMPLEMENTED;
-	SetLastError(ERROR_GEN_FAILURE);
-	return FALSE;
-}
 
-BOOL WINAPI
-UpdateDriverForPlugAndPlayDevicesW(
-	IN HWND hwndParent,
-	IN LPCWSTR HardwareId,
-	IN LPCWSTR FullInfPath,
-	IN DWORD InstallFlags,
-	OUT PBOOL bRebootRequired OPTIONAL)
-{
-	UNIMPLEMENTED;
-	SetLastError(ERROR_GEN_FAILURE);
-	return FALSE;
-}
 
+