Handle more DIF codes in SetupDiCallClassInstaller. The list should now be complete
authorHervé Poussineau <hpoussin@reactos.org>
Tue, 27 Dec 2005 15:19:45 +0000 (15:19 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Tue, 27 Dec 2005 15:19:45 +0000 (15:19 +0000)
svn path=/trunk/; revision=20370

reactos/lib/setupapi/devinst.c
reactos/lib/setupapi/setupapi.spec
reactos/lib/setupapi/stubs.c

index 3bf7cd6..a8a002e 100644 (file)
@@ -3631,6 +3631,14 @@ FreeFunctionPointer(
        return GetLastError();
 }
 
+static BOOL WINAPI
+IntSetupDiRegisterDeviceInfo(
+    IN HDEVINFO DeviceInfoSet,
+    IN OUT PSP_DEVINFO_DATA DeviceInfoData)
+{
+    return SetupDiRegisterDeviceInfo(DeviceInfoSet, DeviceInfoData, 0, NULL, NULL, NULL);
+}
+
 /***********************************************************************
  *             SetupDiCallClassInstaller (SETUPAPI.@)
  */
@@ -3667,9 +3675,15 @@ BOOL WINAPI SetupDiCallClassInstaller(
             case DIF_ADDPROPERTYPAGE_ADVANCED:
                 CanHandle = CLASS_COINSTALLER | DEVICE_COINSTALLER | CLASS_INSTALLER;
                 break;
+            case DIF_ADDREMOTEPROPERTYPAGE_ADVANCED:
+                CanHandle = CLASS_COINSTALLER | DEVICE_COINSTALLER | CLASS_INSTALLER;
+                break;
             case DIF_ALLOW_INSTALL:
                 CanHandle = CLASS_COINSTALLER | CLASS_INSTALLER;
                 break;
+            case DIF_DETECT:
+                CanHandle = CLASS_COINSTALLER | CLASS_INSTALLER;
+                break;
             case DIF_DESTROYPRIVATEDATA:
                 CanHandle = CLASS_INSTALLER;
                 break;
@@ -3694,6 +3708,15 @@ BOOL WINAPI SetupDiCallClassInstaller(
             case DIF_NEWDEVICEWIZARD_PREANALYZE:
                 CanHandle = CLASS_COINSTALLER | CLASS_INSTALLER;
                 break;
+            case DIF_NEWDEVICEWIZARD_PRESELECT:
+                CanHandle = CLASS_COINSTALLER | CLASS_INSTALLER;
+                break;
+            case DIF_NEWDEVICEWIZARD_SELECT:
+                CanHandle = CLASS_COINSTALLER | CLASS_INSTALLER;
+                break;
+            case DIF_POWERMESSAGEWAKE:
+                CanHandle = CLASS_COINSTALLER | DEVICE_COINSTALLER | CLASS_INSTALLER;
+                break;
             case DIF_PROPERTYCHANGE:
                 CanHandle = CLASS_COINSTALLER | DEVICE_COINSTALLER | CLASS_INSTALLER;
                 DefaultHandler = SetupDiChangeState;
@@ -3702,10 +3725,29 @@ BOOL WINAPI SetupDiCallClassInstaller(
                 CanHandle = CLASS_COINSTALLER | CLASS_INSTALLER;
                 DefaultHandler = SetupDiRegisterCoDeviceInstallers;
                 break;
+            case DIF_REGISTERDEVICE:
+                CanHandle = CLASS_COINSTALLER | CLASS_INSTALLER;
+                DefaultHandler = IntSetupDiRegisterDeviceInfo;
+                break;
+            case DIF_REMOVE:
+                CanHandle = CLASS_COINSTALLER | DEVICE_COINSTALLER | CLASS_INSTALLER;
+                DefaultHandler = SetupDiRemoveDevice;
+                break;
             case DIF_SELECTBESTCOMPATDRV:
                 CanHandle = CLASS_COINSTALLER | CLASS_INSTALLER;
                 DefaultHandler = SetupDiSelectBestCompatDrv;
                 break;
+            case DIF_SELECTDEVICE:
+                CanHandle = CLASS_COINSTALLER | CLASS_INSTALLER;
+                DefaultHandler = SetupDiSelectBestCompatDrv;
+                break;
+            case DIF_TROUBLESHOOTER:
+                CanHandle = CLASS_COINSTALLER | DEVICE_COINSTALLER | CLASS_INSTALLER;
+                break;
+            case DIF_UNREMOVE:
+                CanHandle = CLASS_COINSTALLER | DEVICE_COINSTALLER | CLASS_INSTALLER;
+                DefaultHandler = SetupDiUnremoveDevice;
+                break;
             default:
                 ERR("Install function %u not supported\n", InstallFunction);
                 SetLastError(ERROR_NOT_SUPPORTED);
index 15e6423..b2d8ced 100644 (file)
 @ stub SetupDiOpenDeviceInterfaceRegKey
 @ stdcall SetupDiOpenDeviceInterfaceW(ptr wstr long ptr)
 @ stdcall SetupDiRegisterCoDeviceInstallers(ptr ptr)
-@ stub SetupDiRegisterDeviceInfo
-@ stub SetupDiRemoveDevice
+@ stdcall SetupDiRegisterDeviceInfo(ptr ptr long ptr ptr ptr)
+@ stdcall SetupDiRemoveDevice(ptr ptr)
 @ stub SetupDiRemoveDeviceInterface
 @ stdcall SetupDiSelectBestCompatDrv(ptr ptr)
 @ stub SetupDiSelectDevice
 @ stdcall SetupDiSetSelectedDevice(ptr ptr)
 @ stdcall SetupDiSetSelectedDriverA(ptr ptr ptr)
 @ stdcall SetupDiSetSelectedDriverW(ptr ptr ptr)
-@ stub SetupDiUnremoveDevice
+@ stdcall SetupDiUnremoveDevice(ptr ptr)
 @ stub SetupDuplicateDiskSpaceListA
 @ stub SetupDuplicateDiskSpaceListW
 @ stdcall SetupFindFirstLineA(long str str ptr)
index 3d9d366..6ea96da 100644 (file)
@@ -178,3 +178,49 @@ BOOL WINAPI SetupDiDestroyClassImageList(PSP_CLASSIMAGELIST_DATA ClassImageListD
     return TRUE;
 }
 
+
+/***********************************************************************
+ *             SetupDiRegisterDeviceInfo(SETUPAPI.@)
+ */
+BOOL WINAPI
+SetupDiRegisterDeviceInfo(
+    IN HDEVINFO DeviceInfoSet,
+    IN PSP_DEVINFO_DATA DeviceInfoData,
+    IN DWORD Flags,
+    IN PSP_DETSIG_CMPPROC CompareProc OPTIONAL,
+    IN PVOID CompareContext OPTIONAL,
+    OUT PSP_DEVINFO_DATA DupDeviceInfoData OPTIONAL)
+{
+    FIXME ("Stub %p %p 0x%lx %p %p %p\n", DeviceInfoSet, DeviceInfoData,
+        Flags, CompareProc, CompareContext, DupDeviceInfoData);
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+
+/***********************************************************************
+ *             SetupDiRemoveDevice(SETUPAPI.@)
+ */
+BOOL WINAPI
+SetupDiRemoveDevice(
+    IN HDEVINFO DeviceInfoSet,
+    IN PSP_DEVINFO_DATA DeviceInfoData)
+{
+    FIXME ("Stub %p %p\n", DeviceInfoSet, DeviceInfoData);
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
+
+
+/***********************************************************************
+ *             SetupDiUnremoveDevice(SETUPAPI.@)
+ */
+BOOL WINAPI
+SetupDiUnremoveDevice(
+    IN HDEVINFO DeviceInfoSet,
+    IN PSP_DEVINFO_DATA DeviceInfoData)
+{
+    FIXME ("Stub %p %p\n", DeviceInfoSet, DeviceInfoData);
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}