Calling the Default DIF Code Handlers

Default DIF code handlers perform system-defined default operations for DIF codes. As described in Handling DIF Codes, SetupDiCallClassInstaller calls the default handler for a DIF request after the class installer and co-installer have first processed the DIF request, but before SetupDiCallClassInstaller recalls the co-installers that registered for post-processing of the request.

Note  The operation of SetupDiCallClassInstaller cannot be configured to recall the class installer to post-process a DIF request.

In those situations where a class installer must perform operations for a DIF request after the default handler is called, the class installer must directly call the default handler when it processes the DIF request, as follows:

  1. Perform operations that must be done before calling the default handler.

  2. Call the default handler to perform the default operations.

    Note   The class installer must not attempt to supersede the operation of the default handler.

  3. Perform the operations that must be done after the default handler returns.

  4. Return NO_ERROR if the class installer successfully completed processing the DIF request or return a Win32 error if the processing failed.

Important  Co-installers and device installation applications must not call the default DIF code handlers.

For an example of a situation where this method must be used, see the information about calling the default handler SetupDiInstallDevice on the DIF_INSTALLDEVICE request reference page.

The following table lists the DIF codes that have default handlers.

DIF codeDefault DIF code handler function
DIF_PROPERTYCHANGE SetupDiChangeState
DIF_FINISHINSTALL_ACTION SetupDiFinishInstallAction
DIF_INSTALLDEVICE SetupDiInstallDevice
DIF_INSTALLINTERFACES SetupDiInstallDeviceInterfaces
DIF_INSTALLDEVICEFILES SetupDiInstallDriverFiles
DIF_REGISTER_COINSTALLERS SetupDiRegisterCoDeviceInstallers
DIF_REGISTERDEVICE SetupDiRegisterDeviceInfo
DIF_REMOVE SetupDiRemoveDevice
DIF_SELECTBESTCOMPATDRV SetupDiSelectBestCompatDrv
DIF_SELECTDEVICE SetupDiSelectDevice
DIF_UNREMOVE SetupDiUnremoveDevice

 

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft