CM_Delete_Class_Key function

The CM_Delete_Class_Key function removes the specified installed device class from the system.

Syntax

CMAPI CONFIGRET CM_Delete_Class_Key(
  LPGUID ClassGuid,
  ULONG  ulFlags
);

Parameters

ClassGuid

Pointer to the GUID of the device class to remove.

ulFlags

Delete class key flags:

CM_DELETE_CLASS_ONLY

Delete the class only if it does not contain any subkeys.

CM_DELETE_CLASS_SUBKEYS

Delete the class and all of its subkeys.

CM_DELETE_CLASS_INTERFACE (available only in Windows Vista and later)

Indicates that ClassGuid specifies a device interface class and not a device setup class.

Return Value

If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.

Requirements

   
Minimum supported client Available in Microsoft Windows 2000 and later versions of Windows.
Target Platform Universal
Header cfgmgr32.h (include Cfgmgr32.h)
Library Cfgmgr32.lib; OneCoreUAP.lib on Windows 10
DLL CfgMgr32.dll

See Also

CM_Open_Class_Key