CM_Query_Resource_Conflict_List function (cfgmgr32.h)

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

Syntax

CMAPI CONFIGRET CM_Query_Resource_Conflict_List(
  [out]          PCONFLICT_LIST pclConflictList,
  [in]           DEVINST        dnDevInst,
  [in]           RESOURCEID     ResourceID,
  [in]           PCVOID         ResourceData,
  [in]           ULONG          ResourceLen,
  [in]           ULONG          ulFlags,
  [in, optional] HMACHINE       hMachine
);

Parameters

[out] pclConflictList

Caller-supplied address of a location to receive a handle to a conflict list.

[in] dnDevInst

Caller-supplied device instance handle that is bound to the machine handle supplied by hMachine.

[in] ResourceID

Caller-supplied resource type identifier. This must be one of the ResType_-prefixed constants defined in Cfgmgr32.h.

[in] ResourceData

Caller-supplied pointer to a resource descriptor, which can be one of the structures listed under the CM_Add_Res_Des function's description of ResourceData.

[in] ResourceLen

Caller-supplied length of the structure pointed to by ResourceData.

[in] ulFlags

Not used, must be zero.

[in, optional] hMachine

Caller-supplied machine handle to which the caller-supplied device instance handle is bound.

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.

Note  Starting with Windows 8, CM_Query_Resource_Conflict_List returns CR_CALL_NOT_IMPLEMENTED when used in a Wow64 scenario. To request information about the hardware resources on a local machine it is necessary implement an architecture-native version of the application using the hardware resource APIs. For example: An AMD64 application for AMD64 systems.
 

Remarks

When calling CM_Query_Resource_Conflict_List, specify a device instance handle and resource descriptor. (Resource descriptors for existing device nodes can be obtained by calling CM_Get_Res_Des_Data.) These parameters indicate the specific resources you'd like a specific device to use. The resulting conflict list identifies devices that use the same resources, along with resources reserved by the machine.

After calling CM_Query_Resource_Conflict_List, an application can call CM_Get_Resource_Conflict_Count to determine the number of conflicts contained in the resource conflict list. (The number of conflicts can be zero.) Then the application can call CM_Get_Resource_Conflict_Details for each entry in the conflict list.

After an application has finished using the handle received for pclConflictList, it must call CM_Free_Resource_Conflict_Handle.

For information about using device instance handles that are bound to a local or a remote machine, see CM_Get_Child_Ex.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows 2000 and later versions of Windows.
Target Platform Desktop
Header cfgmgr32.h (include Cfgmgr32.h)
Library Cfgmgr32.lib
DLL Cfgmgr32.dll

See also

CM_Free_Resource_Conflict_Handle

CM_Get_Child_Ex

CM_Get_Res_Des_Data

CM_Get_Resource_Conflict_Count

CM_Get_Resource_Conflict_Details