Public PnP Configuration Manager Functions

This section describes the Plug and Play (PnP) Configuration Manager functions that are used by class installers, co-installers, or device installation applications.

In this section

TopicDescription

CM_Add_Empty_Log_Conf

The CM_Add_Empty_Log_Conf function creates an empty logical configuration, for a specified configuration type and a specified device instance, on the local machine.

CM_Add_Empty_Log_Conf_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Add_Empty_Log_Conf instead.
 

The CM_Add_Empty_Log_Conf_Ex function creates an empty logical configuration, for a specified configuration type and a specified device instance, on either the local or a remote machine.

CM_Add_ID

The CM_Add_ID function appends a specified device ID (if not already present) to a device instance's hardware ID list or compatible ID list.

CM_Add_ID_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Add_ID instead.
 

The CM_Add_ID_Ex function appends a device ID (if not already present) to a device instance's hardware ID list or compatible ID list, on either the local or a remote machine.

CM_Add_Res_Des

The CM_Add_Res_Des function adds a resource descriptor to a logical configuration.

CM_Add_Res_Des_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Add_Res_Des instead.
 

The CM_Add_Res_Des_Ex function adds a resource descriptor to a logical configuration. The logical configuration can be on either the local or a remote machine.

CM_Connect_Machine

Note  Beginning in Windows 8 and Windows Server 2012 functionality to access remote machines has been removed. You cannot access remote machines when running on these versions of Windows.
 

The CM_Connect_Machine function creates a connection to a remote machine.

CM_Delete_Class_Key

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

CM_Delete_Device_Interface_Key

The CM_Delete_Device_Interface_Key function deletes the registry subkey that is used by applications and drivers to store interface-specific information.

CM_Delete_Device_Interface_Key_ExA

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Delete_Device_Interface_Key instead.
 

The CM_Delete_Device_Interface_Key_ExA function deletes the registry subkey that is used by applications and drivers to store interface-specific information.

CM_Delete_Device_Interface_Key_ExW

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Delete_Device_Interface_Key instead.
 

The CM_Delete_Device_Interface_Key_ExW function deletes the registry subkey that is used by applications and drivers to store interface-specific information.

CM_Delete_DevNode_Key

The CM_Delete_DevNode_Key function deletes the specified user-accessible registry keys that are associated with a device.

CM_Disable_DevNode

The CM_Disable_DevNode function disables a device.

CM_Disconnect_Machine

Note  Beginning in Windows 8 and Windows Server 2012 functionality to access remote machines has been removed. You cannot access remote machines when running on these versions of Windows.
 

The CM_Disconnect_Machine function removes a connection to a remote machine.

CM_Enable_DevNode

The CM_Enable_DevNode function enables a device.

CM_Enumerate_Classes

The CM_Enumerate_Classes function, when called repeatedly, enumerates the local machine's installed device classes by supplying each class's GUID.

CM_Enumerate_Classes_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Enumerate_Classes instead.
 

The CM_Enumerate_Classes_Ex function, when called repeatedly, enumerates a local or a remote machine's installed device classes, by supplying each class's GUID.

CM_Enumerate_Enumerators

The CM_Enumerate_Enumerators function enumerates the local machine's device enumerators by supplying each enumerator's name.

CM_Enumerate_Enumerators_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Enumerate_Enumerators instead.
 

The CM_Enumerate_Enumerators_Ex function enumerates a local or a remote machine's device enumerators, by supplying each enumerator's name.

CM_Free_Log_Conf

The CM_Free_Log_Conf function removes a logical configuration and all associated resource descriptors from the local machine.

CM_Free_Log_Conf_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Free_Log_Conf instead.
 

The CM_Free_Log_Conf_Ex function removes a logical configuration and all associated resource descriptors from either a local or a remote machine.

CM_Free_Log_Conf_Handle

The CM_Free_Log_Conf_Handle function invalidates a logical configuration handle and frees its associated memory allocation.

CM_Free_Res_Des

The CM_Free_Res_Des function removes a resource descriptor from a logical configuration on the local machine.

CM_Free_Res_Des_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Free_Res_Des instead.
 

The CM_Free_Res_Des_Ex function removes a resource descriptor from a logical configuration on either a local or a remote machine.

CM_Free_Res_Des_Handle

The CM_Free_Res_Des_Handle function invalidates a resource description handle and frees its associated memory allocation.

CM_Free_Resource_Conflict_Handle

The CM_Free_Resource_Conflict_Handle function invalidates a handle to a resource conflict list, and frees the handle's associated memory allocation.

CM_Get_Child

The CM_Get_Child function is used to retrieve a device instance handle to the first child node of a specified device node (devnode) in the local machine's device tree.

CM_Get_Child_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Child instead.
 

The CM_Get_Child_Ex function is used to retrieve a device instance handle to the first child node of a specified device node (devnode) in a local or a remote machine's device tree.

CM_Get_Class_Property

The CM_Get_Class_Property function retrieves a device property that is set for a device interface class or device setup class.

CM_Get_Class_Property_ExW

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Class_Property instead.
 

The CM_Get_Class_Property_ExW function retrieves a device property that is set for a device interface class or device setup class.

CM_Get_Class_Property_Keys

The CM_Get_Class_Property_Keys function retrieves an array of the device property keys that represent the device properties that are set for a device interface class or device setup class.

CM_Get_Class_Property_Keys_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Class_Property_Keys instead.
 

The CM_Get_Class_Property_Keys_Ex function retrieves an array of the device property keys that represent the device properties that are set for a device interface class or device setup class.

CM_Get_Class_Registry_Property

The CM_Get_Class_Registry_Property function retrieves a device setup class property.

CM_Get_Depth

The CM_Get_Depth function is used to obtain the depth of a specified device node (devnode) within the local machine's device tree.

CM_Get_Depth_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Depth instead.
 

The CM_Get_Depth_Ex function is used to obtain the depth of a specified device node (devnode) within a local or a remote machine's device tree.

CM_Get_Device_ID

The CM_Get_Device_ID function retrieves the device instance ID for a specified device instance on the local machine.

CM_Get_Device_ID_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Device_ID instead.
 

The CM_Get_Device_ID_Ex function retrieves the device instance ID for a specified device instance on a local or a remote machine.

CM_Get_Device_ID_List

The CM_Get_Device_ID_List function retrieves a list of device instance IDs for the local computer's device instances.

CM_Get_Device_ID_List_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Device_ID_List instead.
 

The CM_Get_Device_ID_List_Ex function retrieves a list of device instance IDs for the device instances on a local or a remote machine.

CM_Get_Device_ID_List_Size

The CM_Get_Device_ID_List_Size function retrieves the buffer size required to hold a list of device instance IDs for the local machine's device instances.

CM_Get_Device_ID_List_Size_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Device_ID_List_Size instead.
 

The CM_Get_Device_ID_List_Size_Ex function retrieves the buffer size required to hold a list of device instance IDs for a local or a remote machine's device instances.

CM_Get_Device_ID_Size

The CM_Get_Device_ID_Size function retrieves the buffer size required to hold a device instance ID for a device instance on the local machine.

CM_Get_Device_ID_Size_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Device_ID_Size instead.
 

The CM_Get_Device_ID_Size_Ex function retrieves the buffer size required to hold a device instance ID for a device instance on a local or a remote machine.

CM_Get_Device_Interface_Alias

The CM_Get_Device_Interface_Alias function returns the alias of the specified device interface instance, if the alias exists.

CM_Get_Device_Interface_List

The CM_Get_Device_Interface_List function retrieves a list of device interface instances that belong to a specified device interface class.

CM_Get_Device_Interface_List_Size

The CM_Get_Device_Interface_List_Size function retrieves the buffer size that must be passed to the CM_Get_Device_Interface_List function.

CM_Get_Device_Interface_Property

The CM_Get_Device_Interface_Property function retrieves a device property that is set for a device interface.

CM_Get_Device_Interface_Property_ExW

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Device_Interface_Property instead.
 

The CM_Get_Device_Interface_Property_ExW function retrieves a device property that is set for a device interface.

CM_Get_Device_Interface_Property_Keys

The CM_Get_Device_Interface_Property_Keys function retrieves an array of device property keys that represent the device properties that are set for a device interface.

CM_Get_Device_Interface_Property_Keys_ExW

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Device_Interface_Property_Keys instead.
 

The CM_Get_Device_Interface_Property_Keys_ExW function retrieves an array of device property keys that represent the device properties that are set for a device interface.

CM_Get_DevNode_Property

The CM_Get_DevNode_Property function retrieves a device instance property.

CM_Get_DevNode_Property_ExW

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_DevNode_Property instead.
 

The CM_Get_DevNode_Property_ExW function retrieves a device instance property.

CM_Get_DevNode_Property_Keys

The CM_Get_DevNode_Property_Keys function retrieves an array of the device property keys that represent the device properties that are set for a device instance.

CM_Get_DevNode_Property_Keys_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_DevNode_Property_Keys instead.
 

The CM_Get_DevNode_Property_Keys_Ex function retrieves an array of the device property keys that represent the device properties that are set for a device instance.

CM_Get_DevNode_Registry_Property

The CM_Get_DevNode_Registry_Property function retrieves a specified device property from the registry.

CM_Get_DevNode_Status

The CM_Get_DevNode_Status function obtains the status of a device instance from its device node (devnode) in the local machine's device tree.

CM_Get_DevNode_Status_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_DevNode_Status instead.
 

The CM_Get_DevNode_Status_Ex function obtains the status of a device instance from its device node (devnode) on a local or a remote machine's device tree.

CM_Get_First_Log_Conf

The CM_Get_First_Log_Conf function obtains the first logical configuration, of a specified configuration type, associated with a specified device instance on the local machine.

CM_Get_First_Log_Conf_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_First_Log_Conf instead.
 

The CM_Get_First_Log_Conf_Ex function obtains the first logical configuration associated with a specified device instance on a local or a remote machine.

CM_Get_HW_Prof_Flags

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated and should not be used.
 

The CM_Get_HW_Prof_Flags function retrieves the hardware profile-specific configuration flags for a device instance on a local machine.

CM_Get_HW_Prof_Flags_Ex

Note  This function has been deprecated and should not be used.
 

The CM_Get_HW_Prof_Flags_Ex function retrieves the hardware profile-specific configuration flags for a device instance on a remote machine or a local machine.

CM_Get_Log_Conf_Priority

The CM_Get_Log_Conf_Priority function obtains the configuration priority of a specified logical configuration on the local machine.

CM_Get_Log_Conf_Priority_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Log_Conf_Priority instead.
 

The CM_Get_Log_Conf_Priority_Ex function obtains the configuration priority of a specified logical configuration on a local or a remote machine.

CM_Get_Next_Log_Conf

The CM_Get_Next_Log_Conf function obtains the next logical configuration associated with a specific device instance on the local machine.

CM_Get_Next_Log_Conf_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Next_Log_Conf instead.
 

The CM_Get_Next_Log_Conf_Ex function obtains the next logical configuration associated with a specific device instance on a local or a remote machine.

CM_Get_Next_Res_Des

The CM_Get_Next_Res_Des function obtains a handle to the next resource descriptor, of a specified resource type, for a logical configuration on the local machine.

CM_Get_Next_Res_Des_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Next_Res_Des instead.
 

The CM_Get_Next_Res_Des_Ex function obtains a handle to the next resource descriptor, of a specified resource type, for a logical configuration on a local or a remote machine.

CM_Get_Parent

The CM_Get_Parent function obtains a device instance handle to the parent node of a specified device node (devnode) in the local machine's device tree.

CM_Get_Parent_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Parent instead.
 

The CM_Get_Parent_Ex function obtains a device instance handle to the parent node of a specified device node (devnode) in a local or a remote machine's device tree.

CM_Get_Res_Des_Data

The CM_Get_Res_Des_Data function retrieves the information stored in a resource descriptor on the local machine.

CM_Get_Res_Des_Data_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Res_Des_Data instead.
 

The CM_Get_Res_Des_Data_Ex function retrieves the information stored in a resource descriptor on a local or a remote machine.

CM_Get_Res_Des_Data_Size

The CM_Get_Res_Des_Data_Size function obtains the buffer size required to hold the information contained in a specified resource descriptor on the local machine.

CM_Get_Res_Des_Data_Size_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Res_Des_Data_Size instead.
 

The CM_Get_Res_Des_Data_Size_Ex function obtains the buffer size required to hold the information contained in a specified resource descriptor on a local or a remote machine.

CM_Get_Resource_Conflict_Count

The CM_Get_Resource_Conflict_Count function obtains the number of conflicts contained in a specified resource conflict list.

CM_Get_Resource_Conflict_Details

The CM_Get_Resource_Conflict_Details function obtains the details about one of the resource conflicts in a conflict list.

CM_Get_Sibling

The CM_Get_Sibling function obtains a device instance handle to the next sibling node of a specified device node (devnode) in the local machine's device tree.

CM_Get_Sibling_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Get_Sibling instead.
 

The CM_Get_Sibling_Ex function obtains a device instance handle to the next sibling node of a specified device node, in a local or a remote machine's device tree.

CM_Get_Version

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated and should not be used.
 

The CM_Get_Version function returns version 4.0 of the Plug and Play (PnP) Configuration Manager DLL (Cfgmgr32.dll) for a local machine.

CM_Get_Version_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated and should not be used.
 

The CM_Get_Version_Ex function returns version 4.0 of the Plug and Play (PnP) Configuration Manager DLL (Cfgmgr32.dll) for a local or a remote machine.

CM_Is_Dock_Station_Present

The CM_Is_Dock_Station_Present function identifies whether a docking station is present in a local machine.

CM_Is_Dock_Station_Present_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Is_Dock_Station_Present instead.
 

The CM_Is_Dock_Station_Present_Ex function identifies whether a docking station is present in a local or a remote machine.

CM_Is_Version_Available

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated and should not be used.
 

The CM_Is_Version_Available function indicates whether a specified version of the Plug and Play (PnP) Configuration Manager DLL (Cfgmgr32.dll) is supported by a local machine.

CM_Is_Version_Available_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated and should not be used.
 

The CM_Is_Version_Available_Ex function indicates whether a specified version of the Plug and Play (PNP) Configuration Manager DLL (Cfgmgr32.dll) is supported by a local or a remote machine.

CM_Locate_DevNode

The CM_Locate_DevNode function obtains a device instance handle to the device node that is associated with a specified device instance ID on the local machine.

CM_Locate_DevNode_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Locate_DevNode instead.
 

The CM_Locate_DevNode_Ex function obtains a device instance handle to the device node that is associated with a specified device instance ID, on a local machine or a remote machine.

CM_MapCrToWin32Err

Converts a specified CONFIGRET code to its equivalent system error code.

CM_Modify_Res_Des

The CM_Modify_Res_Des function modifies a specified resource descriptor on the local machine.

CM_Modify_Res_Des_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Modify_Res_Des instead.
 

The CM_Modify_Res_Des_Ex function modifies a specified resource descriptor on a local or a remote machine.

CM_Open_Class_Key

The CM_Open_Class_Key function opens the device setup class registry key, the device interface class registry key, or a specific subkey of a class.

CM_Open_Device_Interface_Key

The CM_Open_Device_Interface_Key function opens the registry subkey that is used by applications and drivers to store information that is specific to a device interface.

CM_Open_Device_Interface_Key_ExA

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Open_Device_Interface_Key instead.
 

The CM_Open_Device_Interface_Key_ExA function opens the registry subkey that is used by applications and drivers to store information that is specific to a device interface.

CM_Open_Device_Interface_Key_ExW

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Open_Device_Interface_Key instead.
 

The CM_Open_Device_Interface_Key_ExW function opens the registry subkey that is used by applications and drivers to store information that is specific to a device interface.

CM_Open_DevNode_Key

The CM_Open_DevNode_Key function opens a registry key for device-specific configuration information.

CM_Query_And_Remove_SubTree

The CM_Query_And_Remove_SubTree function checks whether a device instance and its children can be removed and, if so, it removes them.

CM_Query_And_Remove_SubTree_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Query_And_Remove_SubTree instead.
 

The CM_Query_And_Remove_SubTree_Ex function checks whether a device instance and its children can be removed and, if so, it removes them.

CM_Query_Resource_Conflict_List

The CM_Query_Resource_Conflict_List function identifies device instances having resource requirements that conflict with a specified device instance's resource description.

CM_Reenumerate_DevNode

The CM_Reenumerate_DevNode function enumerates the devices identified by a specified device node and all of its children.

CM_Reenumerate_DevNode_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Reenumerate_DevNode instead.
 

The CM_Reenumerate_DevNode_Ex function enumerates the devices identified by a specified device node and all of its children.

CM_Register_Notification

Use RegisterDeviceNotification instead of CM_Register_Notification if your code targets Windows 7 or earlier versions of Windows. Kernel mode callers should use IoRegisterPlugPlayNotification instead.

The CM_Register_Notification function registers an application callback routine to be called when a PnP event of the specified type occurs.

CM_Request_Device_Eject

The CM_Request_Device_Eject function prepares a local device instance for safe removal, if the device is removable. If the device can be physically ejected, it will be.

CM_Request_Device_Eject_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Request_Device_Eject instead.
 

The CM_Request_Device_Eject_Ex function prepares a local or a remote device instance for safe removal, if the device is removable. If the device can be physically ejected, it will be.

CM_Request_Eject_PC

The CM_Request_Eject_PC function requests that a portable PC, which is inserted in a local docking station, be ejected.

CM_Request_Eject_PC_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Request_Eject_PC instead.
 

The CM_Request_Eject_PC_Ex function requests that a portable PC, which is inserted in a local or a remote docking station, be ejected.

CM_Set_Class_Property

The CM_Set_Class_Property function sets a class property for a device setup class or a device interface class.

CM_Set_Class_Property_ExW

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Set_Class_Property instead.
 

The CM_Set_Class_Property_ExW function sets a class property for a device setup class or a device interface class.

CM_Set_Class_Registry_Property

The CM_Set_Class_Registry_Property function sets or deletes a property of a device setup class.

CM_Set_Device_Interface_Property

The CM_Set_Device_Interface_Property function sets a device property of a device interface.

CM_Set_Device_Interface_Property_ExW

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Set_Device_Interface_Property instead.
 

The CM_Set_Device_Interface_Property_ExW function sets a device property of a device interface.

CM_Set_DevNode_Problem

The CM_Set_DevNode_Problem function sets a problem code for a device that is installed in a local machine.

CM_Set_DevNode_Problem_Ex

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Set_DevNode_Problem instead.
 

The CM_Set_DevNode_Problem_Ex function sets a problem code for a device that is installed in a local or a remote machine.

CM_Set_DevNode_Property

The CM_Set_DevNode_Property function sets a device instance property.

CM_Set_DevNode_Property_ExW

Note  Beginning with Windows 8 and Windows Server 2012, this function has been deprecated. Please use CM_Set_DevNode_Property instead.
 

The CM_Set_DevNode_Property_ExW function sets a device instance property.

CM_Set_DevNode_Registry_Property

The CM_Set_DevNode_Registry_Property function sets a specified device property in the registry.

CM_Setup_DevNode

The CM_Setup_DevNode function restarts a device instance that is not running because there is a problem with the device configuration.

CM_Uninstall_DevNode

The CM_Uninstall_DevNode function removes all persistent state associated with a device instance.

CM_Unregister_Notification

Use UnregisterDeviceNotification instead of CM_Unregister_Notification if your code targets Windows 7 or earlier versions of Windows.

The CM_Unregister_Notification function closes the specified HCMNOTIFICATION handle.

CM_WaitNoPendingInstallEvents

CMP_WaitNoPendingInstallEvents

The CMP_WaitNoPendingInstallEvents function waits until there are no pending device installation activities for the PnP manager to perform.

 

 

 

Send comments about this topic to Microsoft

Show: