[ros-diffs] [hpoussin] 20443: Set DI_FLAGSEX_ALLOWEXCLUDEDDRVS flag when searching a driver for a PnP device

hpoussin at svn.reactos.org hpoussin at svn.reactos.org
Thu Dec 29 23:02:32 CET 2005


Set DI_FLAGSEX_ALLOWEXCLUDEDDRVS flag when searching a driver for a PnP
device
Modified: trunk/reactos/lib/newdev/newdev.c
  _____  

Modified: trunk/reactos/lib/newdev/newdev.c
--- trunk/reactos/lib/newdev/newdev.c	2005-12-29 21:46:40 UTC (rev
20442)
+++ trunk/reactos/lib/newdev/newdev.c	2005-12-29 22:02:14 UTC (rev
20443)
@@ -739,9 +739,22 @@

 FindDriver(
            IN PDEVINSTDATA DevInstData)
 {
-
+    SP_DEVINSTALL_PARAMS DevInstallParams = {0,};
     BOOL ret;
 
+    DevInstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS);
+    if (!SetupDiGetDeviceInstallParams(DevInstData->hDevInfo,
&DevInstData->devInfoData, &DevInstallParams))
+    {
+        DPRINT("SetupDiGetDeviceInstallParams() failed with error
0x%lx\n", GetLastError());
+        return FALSE;
+    }
+    DevInstallParams.FlagsEx |= DI_FLAGSEX_ALLOWEXCLUDEDDRVS;
+    if (!SetupDiSetDeviceInstallParams(DevInstData->hDevInfo,
&DevInstData->devInfoData, &DevInstallParams))
+    {
+        DPRINT("SetupDiSetDeviceInstallParams() failed with error
0x%lx\n", GetLastError());
+        return FALSE;
+    }
+
     ret = SetupDiBuildDriverInfoList(DevInstData->hDevInfo,
&DevInstData->devInfoData, SPDIT_COMPATDRIVER);
     if (!ret)
     {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051229/81544739/attachment.html


More information about the Ros-diffs mailing list