[ros-diffs] [dchapyshev] 38817: - Launch hardware wizard on hardware page

dchapyshev at svn.reactos.org dchapyshev at svn.reactos.org
Sat Jan 17 16:13:11 CET 2009


Author: dchapyshev
Date: Sat Jan 17 09:13:10 2009
New Revision: 38817

URL: http://svn.reactos.org/svn/reactos?rev=38817&view=rev
Log:
- Launch hardware wizard on hardware page

Modified:
    trunk/reactos/dll/cpl/sysdm/hardware.c

Modified: trunk/reactos/dll/cpl/sysdm/hardware.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/hardware.c?rev=38817&r1=38816&r2=38817&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/hardware.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/sysdm/hardware.c [iso-8859-1] Sat Jan 17 09:13:10 2009
@@ -41,6 +41,28 @@
 #endif /* __REACTOS__ */
 }
 
+static VOID
+LaunchHardwareWizard(HWND hWndParent)
+{
+    SHELLEXECUTEINFO shInputDll;
+
+    memset(&shInputDll, 0x0, sizeof(SHELLEXECUTEINFO));
+
+    shInputDll.cbSize = sizeof(shInputDll);
+    shInputDll.hwnd = hWndParent;
+    shInputDll.lpVerb = _T("open");
+    shInputDll.lpFile = _T("rundll32.exe");
+    shInputDll.lpParameters = _T("shell32.dll,Control_RunDLL hdwwiz.cpl");
+
+    if (ShellExecuteEx(&shInputDll) == 0)
+    {
+        MessageBox(NULL,
+                   _T("Can't start hdwwiz.cpl"),
+                   NULL,
+                   MB_OK | MB_ICONERROR);
+    }
+}
+
 /* Property page dialog callback */
 INT_PTR CALLBACK
 HardwarePageProc(HWND hwndDlg,
@@ -65,6 +87,10 @@
                     }
                     return TRUE;
 
+                case IDC_HARDWARE_WIZARD:
+                    LaunchHardwareWizard(hwndDlg);
+                    return TRUE;
+
                 case IDC_HARDWARE_PROFILE:
                     DialogBox(hApplet,
                               MAKEINTRESOURCE(IDD_HARDWAREPROFILES),



More information about the Ros-diffs mailing list