[NEWDEV]
authorEric Kohl <eric.kohl@reactos.org>
Mon, 6 Oct 2014 14:23:36 +0000 (14:23 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Mon, 6 Oct 2014 14:23:36 +0000 (14:23 +0000)
- Implement InstallDevInst.
- Display different wizard titles for the instller and update wizard.
- Add header titles to the wizard pages.
- Add new header file for private functions.

svn path=/trunk/; revision=64558

28 files changed:
reactos/dll/win32/newdev/lang/bg-BG.rc
reactos/dll/win32/newdev/lang/cs-CZ.rc
reactos/dll/win32/newdev/lang/de-DE.rc
reactos/dll/win32/newdev/lang/el-GR.rc
reactos/dll/win32/newdev/lang/en-US.rc
reactos/dll/win32/newdev/lang/es-ES.rc
reactos/dll/win32/newdev/lang/fr-FR.rc
reactos/dll/win32/newdev/lang/he-IL.rc
reactos/dll/win32/newdev/lang/hu-HU.rc
reactos/dll/win32/newdev/lang/id-ID.rc
reactos/dll/win32/newdev/lang/it-IT.rc
reactos/dll/win32/newdev/lang/ja-JP.rc
reactos/dll/win32/newdev/lang/nl-NL.rc
reactos/dll/win32/newdev/lang/no-NO.rc
reactos/dll/win32/newdev/lang/pl-PL.rc
reactos/dll/win32/newdev/lang/ro-RO.rc
reactos/dll/win32/newdev/lang/ru-RU.rc
reactos/dll/win32/newdev/lang/sk-SK.rc
reactos/dll/win32/newdev/lang/sq-AL.rc
reactos/dll/win32/newdev/lang/th-TH.rc
reactos/dll/win32/newdev/lang/tr-TR.rc
reactos/dll/win32/newdev/lang/uk-UA.rc
reactos/dll/win32/newdev/newdev.c
reactos/dll/win32/newdev/newdev.spec
reactos/dll/win32/newdev/newdev_private.h
reactos/dll/win32/newdev/resource.h
reactos/dll/win32/newdev/wizard.c
reactos/include/reactos/dll/newdevp.h [new file with mode: 0644]

index 78b494e..98bca2a 100644 (file)
@@ -85,3 +85,12 @@ BEGIN
     LTEXT "Натиснете „Край“ за затваряне на вълшебника.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "НЕИЗВЕСТНО УСТРОЙСТВО", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 2f3e46e..06e7e01 100644 (file)
@@ -90,3 +90,12 @@ BEGIN
     LTEXT "Kliknutím na Dokončit zavřete průvodce.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "UNKNOWN DEVICE", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 86beb38..6c2b392 100644 (file)
@@ -85,3 +85,12 @@ BEGIN
     LTEXT "Klicken Sie zum Beenden der Installation auf Fertigstellen.", IDC_STATIC, 120, 174, 190, 11
     LTEXT "UNKNOWN DEVICE", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 99805e8..a1a7423 100644 (file)
@@ -85,3 +85,12 @@ BEGIN
     LTEXT "Πατήστε 'Ολοκλήρωση' για να κλείσετε το βοηθό.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "ΑΓΝΩΣΤΗ ΣΥΣΚΕΥΗ", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 9086395..caccf8f 100644 (file)
@@ -85,3 +85,12 @@ BEGIN
     LTEXT "Click Finish to close the wizard.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "UNKNOWN DEVICE", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 3a97016..0d500cf 100644 (file)
@@ -85,3 +85,12 @@ BEGIN
     LTEXT "Haga clic en Finalizar parar cerrar el asistente.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "DISPOSITIVO DESCONOCIDO", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 18b28fb..ce0f966 100644 (file)
@@ -85,3 +85,12 @@ BEGIN
     LTEXT "Cliquer sur Terminer pour fermer l'assistant.", IDC_STATIC, 115, 174, 179, 11
     LTEXT "MATERIEL INCONNU", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 70c91c1..6ff1043 100644 (file)
@@ -85,3 +85,12 @@ BEGIN
     LTEXT "לחץ סיום כדי לסגור את האשף.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "UNKNOWN DEVICE", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 268c91e..4bb5d4e 100644 (file)
@@ -87,3 +87,12 @@ BEGIN
     LTEXT "A kilépéshez kattints a Befejezés gombra.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "Ismeretlen eszköz!", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 5f352d8..22307b9 100644 (file)
@@ -85,3 +85,12 @@ BEGIN
     LTEXT "Klik Selesai untuk menutup bimbingan.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "DEVICE TIDAK DIKENAL", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 476afe9..7a51ef0 100644 (file)
@@ -87,3 +87,12 @@ BEGIN
     LTEXT "Selezionare Fine per chiudere questa procedura guidata.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "DISPOSITIVO SCONOSCIUTO", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 114c543..c99796c 100644 (file)
@@ -85,3 +85,12 @@ BEGIN
     LTEXT "[完了] をクリックするとウィザードを閉じます。", IDC_STATIC, 120, 174, 179, 11
     LTEXT "不明なデバイス", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index be2713d..7112f74 100644 (file)
@@ -92,3 +92,12 @@ BEGIN
     LTEXT "Klik op Voltooien om de wizard te sluiten.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "ONBEKEND APPARAAT", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 5492bbf..73289e8 100644 (file)
@@ -87,3 +87,12 @@ BEGIN
     LTEXT "Trykk Fullfør for å avslutte veiviseren.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "UKJENT ENHET", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index bdbe8d7..0bd1b3c 100644 (file)
@@ -93,3 +93,12 @@ BEGIN
     LTEXT "Naciśnij Zakończ, aby zamknąć kreator.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "NIEZNANE URZĄDZENIE", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index cce0c81..ab06dba 100644 (file)
@@ -94,3 +94,12 @@ BEGIN
     LTEXT "Apăsați „Sfârșit” pentru a încheia instalarea.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "DISPOZITIV NECUNOSCUT", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index de1d67d..8657a8b 100644 (file)
@@ -85,3 +85,12 @@ BEGIN
     LTEXT "Нажмите ""Готово"" для завершения мастера.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "Неизвестное устройство", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 5e38f59..b6e1458 100644 (file)
@@ -90,3 +90,12 @@ BEGIN
     LTEXT "Kliknutím na tlačidlo Dokončiť zavriete sprievodcu.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "NEZNÁME ZARIADENIE", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 391cd75..1f869fc 100644 (file)
@@ -89,3 +89,12 @@ BEGIN
     LTEXT "Kliko Mbaro për të mbyllur magjistar.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "PAJISJE PANJOHUR", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 161d76a..4557e7c 100644 (file)
@@ -87,3 +87,12 @@ BEGIN
     LTEXT "กดเลือกเสร็จสิ้นเพื่อปิดการติดตั้งอัตโนมัติ", IDC_STATIC, 120, 174, 179, 11
     LTEXT "ไม่รู้จักอุปกรณ์", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 00192ef..3c8f933 100644 (file)
@@ -87,3 +87,12 @@ BEGIN
     LTEXT "Bu yardımcıyı kapatmak için Bitir'e tıklayınız.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "BİLİNMEYEN AYGIT", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index b98f4ac..5923b5f 100644 (file)
@@ -93,3 +93,12 @@ BEGIN
     LTEXT "Натисніть ""Завершити"" для виходу з майстра.", IDC_STATIC, 120, 174, 179, 11
     LTEXT "НЕВІДОМИЙ ПРИСТРІЙ", IDC_DEVICE, 148, 53, 147, 12
 END
+
+STRINGTABLE
+BEGIN
+    IDS_INSTALLWIZARDTITLE "New hardware wizard"
+    IDS_UPDATEWIZARDTITLE "Update driver wizard"
+    IDS_CHSOURCE_TITLE "Choose search and install options"
+    IDS_SEARCHDRV_TITLE "Searching..."
+    IDS_INSTALLDRV_TITLE "Installing..."
+END
index 1689176..fe88320 100644 (file)
@@ -804,6 +804,118 @@ cleanup:
     return retval;
 }
 
+
+BOOL
+WINAPI
+InstallDevInst(
+    IN HWND hWndParent,
+    IN LPCWSTR InstanceId,
+    IN BOOL bUpdate,
+    OUT LPDWORD lpReboot)
+{
+    PDEVINSTDATA DevInstData = NULL;
+    BOOL ret;
+    BOOL retval = FALSE;
+
+    TRACE("InstllDevInst(%p, %s, %d, %p)\n", hWndParent, debugstr_w(InstanceId), bUpdate, lpReboot);
+
+    DevInstData = HeapAlloc(GetProcessHeap(), 0, sizeof(DEVINSTDATA));
+    if (!DevInstData)
+    {
+        TRACE("HeapAlloc() failed\n");
+        SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+        goto cleanup;
+    }
+
+    /* Clear devinst data */
+    ZeroMemory(DevInstData, sizeof(DEVINSTDATA));
+    DevInstData->devInfoData.cbSize = 0; /* Tell if the devInfoData is valid */
+    DevInstData->bUpdate = bUpdate;
+
+    /* Fill devinst data */
+    DevInstData->hDevInfo = SetupDiCreateDeviceInfoListExW(NULL, NULL, NULL, NULL);
+    if (DevInstData->hDevInfo == INVALID_HANDLE_VALUE)
+    {
+        TRACE("SetupDiCreateDeviceInfoListExW() failed with error 0x%x\n", GetLastError());
+        goto cleanup;
+    }
+
+    DevInstData->devInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
+    ret = SetupDiOpenDeviceInfoW(
+        DevInstData->hDevInfo,
+        InstanceId,
+        NULL,
+        0, /* Open flags */
+        &DevInstData->devInfoData);
+    if (!ret)
+    {
+        TRACE("SetupDiOpenDeviceInfoW() failed with error 0x%x (InstanceId %s)\n",
+            GetLastError(), debugstr_w(InstanceId));
+        DevInstData->devInfoData.cbSize = 0;
+        goto cleanup;
+    }
+
+    SetLastError(ERROR_GEN_FAILURE);
+    ret = SetupDiGetDeviceRegistryProperty(
+        DevInstData->hDevInfo,
+        &DevInstData->devInfoData,
+        SPDRP_DEVICEDESC,
+        &DevInstData->regDataType,
+        NULL, 0,
+        &DevInstData->requiredSize);
+
+    if (!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER && DevInstData->regDataType == REG_SZ)
+    {
+        DevInstData->buffer = HeapAlloc(GetProcessHeap(), 0, DevInstData->requiredSize);
+        if (!DevInstData->buffer)
+        {
+            TRACE("HeapAlloc() failed\n");
+            SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+        }
+        else
+        {
+            ret = SetupDiGetDeviceRegistryPropertyW(
+                DevInstData->hDevInfo,
+                &DevInstData->devInfoData,
+                SPDRP_DEVICEDESC,
+                &DevInstData->regDataType,
+                DevInstData->buffer, DevInstData->requiredSize,
+                &DevInstData->requiredSize);
+        }
+    }
+
+    if (!ret)
+    {
+        TRACE("SetupDiGetDeviceRegistryProperty() failed with error 0x%x (InstanceId %s)\n",
+            GetLastError(), debugstr_w(InstanceId));
+        goto cleanup;
+    }
+
+    /* Prepare the wizard, and display it */
+    TRACE("Need to show install wizard\n");
+    retval = DisplayWizard(DevInstData, hWndParent, IDD_WELCOMEPAGE);
+
+cleanup:
+    if (DevInstData)
+    {
+        if (DevInstData->devInfoData.cbSize != 0)
+        {
+            if (!SetupDiDestroyDriverInfoList(DevInstData->hDevInfo, &DevInstData->devInfoData, SPDIT_COMPATDRIVER))
+                TRACE("SetupDiDestroyDriverInfoList() failed with error 0x%lx\n", GetLastError());
+        }
+        if (DevInstData->hDevInfo != INVALID_HANDLE_VALUE)
+        {
+            if (!SetupDiDestroyDeviceInfoList(DevInstData->hDevInfo))
+                TRACE("SetupDiDestroyDeviceInfoList() failed with error 0x%lx\n", GetLastError());
+        }
+        HeapFree(GetProcessHeap(), 0, DevInstData->buffer);
+        HeapFree(GetProcessHeap(), 0, DevInstData);
+    }
+
+    return retval;
+}
+
+
 /*
 * @implemented
 */
index 3dd2357..56e3d1b 100644 (file)
@@ -1,6 +1,6 @@
 @ stdcall ClientSideInstallW(ptr ptr wstr long)
 @ stdcall DevInstallW(ptr ptr wstr long)
-@ stub InstallDevInst
+@ stdcall InstallDevInst(ptr wstr long ptr)
 @ stub InstallDevInstEx
 @ stdcall InstallNewDevice(ptr ptr ptr)
 @ stub InstallSelectedDevice
index 1161203..baf570c 100644 (file)
@@ -17,6 +17,7 @@
 #include <windowsx.h>
 #include <newdev.h>
 #include <regstr.h>
+#include <dll/newdevp.h>
 
 #include <wine/debug.h>
 WINE_DEFAULT_DEBUG_CHANNEL(newdev);
@@ -28,6 +29,7 @@ extern HINSTANCE hDllInstance;
 typedef struct _DEVINSTDATA
 {
        HFONT hTitleFont;
+       BOOL bUpdate;
        PBYTE buffer;
        DWORD requiredSize;
        DWORD regDataType;
index 7c40601..fc3258a 100644 (file)
@@ -27,3 +27,9 @@
 #define IDD_NEEDREBOOT    6
 #define IDD_FINISHPAGE    7
 #define IDD_MAXIMUMPAGE   IDD_FINISHPAGE
+
+#define IDS_INSTALLWIZARDTITLE 1000
+#define IDS_UPDATEWIZARDTITLE  1001
+#define IDS_CHSOURCE_TITLE     1002
+#define IDS_SEARCHDRV_TITLE    1003
+#define IDS_INSTALLDRV_TITLE   1004
index d94d49c..d3ec237 100644 (file)
@@ -1252,51 +1252,55 @@ DisplayWizard(
     /* Create the Welcome page */
     ZeroMemory(&psp, sizeof(PROPSHEETPAGE));
     psp.dwSize = sizeof(PROPSHEETPAGE);
-    psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
+    psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE;
     psp.hInstance = hDllInstance;
     psp.lParam = (LPARAM)DevInstData;
+    psp.pszTitle = MAKEINTRESOURCE(DevInstData->bUpdate ? IDS_UPDATEWIZARDTITLE : IDS_INSTALLWIZARDTITLE);
     psp.pfnDlgProc = WelcomeDlgProc;
     psp.pszTemplate = MAKEINTRESOURCE(IDD_WELCOMEPAGE);
     ahpsp[IDD_WELCOMEPAGE] = CreatePropertySheetPage(&psp);
 
     /* Create the Select Source page */
-    psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+    psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USETITLE;
+    psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_CHSOURCE_TITLE);
     psp.pfnDlgProc = CHSourceDlgProc;
     psp.pszTemplate = MAKEINTRESOURCE(IDD_CHSOURCE);
     ahpsp[IDD_CHSOURCE] = CreatePropertySheetPage(&psp);
 
     /* Create the Search driver page */
-    psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+    psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USETITLE;
+    psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_SEARCHDRV_TITLE);
     psp.pfnDlgProc = SearchDrvDlgProc;
     psp.pszTemplate = MAKEINTRESOURCE(IDD_SEARCHDRV);
     ahpsp[IDD_SEARCHDRV] = CreatePropertySheetPage(&psp);
 
     /* Create the Install driver page */
-    psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
+    psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USETITLE;
+    psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_INSTALLDRV_TITLE);
     psp.pfnDlgProc = InstallDrvDlgProc;
     psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLDRV);
     ahpsp[IDD_INSTALLDRV] = CreatePropertySheetPage(&psp);
 
     /* Create the No driver page */
-    psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
+    psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE;
     psp.pfnDlgProc = NoDriverDlgProc;
     psp.pszTemplate = MAKEINTRESOURCE(IDD_NODRIVER);
     ahpsp[IDD_NODRIVER] = CreatePropertySheetPage(&psp);
 
     /* Create the Install failed page */
-    psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
+    psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE;
     psp.pfnDlgProc = InstallFailedDlgProc;
     psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLFAILED);
     ahpsp[IDD_INSTALLFAILED] = CreatePropertySheetPage(&psp);
 
     /* Create the Need reboot page */
-    psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
+    psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE;
     psp.pfnDlgProc = NeedRebootDlgProc;
     psp.pszTemplate = MAKEINTRESOURCE(IDD_NEEDREBOOT);
     ahpsp[IDD_NEEDREBOOT] = CreatePropertySheetPage(&psp);
 
     /* Create the Finish page */
-    psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
+    psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE;
     psp.pfnDlgProc = FinishDlgProc;
     psp.pszTemplate = MAKEINTRESOURCE(IDD_FINISHPAGE);
     ahpsp[IDD_FINISHPAGE] = CreatePropertySheetPage(&psp);
diff --git a/reactos/include/reactos/dll/newdevp.h b/reactos/include/reactos/dll/newdevp.h
new file mode 100644 (file)
index 0000000..36226cc
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * newdevp.h
+ *
+ * Private header for newdev.dll
+ *
+ */
+
+#ifndef __NEWDEVP__H
+#define __NEWDEVP__H
+
+BOOL
+WINAPI
+DevInstallW(
+    IN HWND hWndParent,
+    IN HINSTANCE hInstance,
+    IN LPCWSTR InstanceId,
+    IN INT Show);
+
+BOOL
+WINAPI
+InstallDevInst(
+    IN HWND hWndParent,
+    IN LPCWSTR InstanceId,
+    IN BOOL bUpdate,
+    OUT LPDWORD lpReboot);
+
+#endif /* __NEWDEVP__H */