CM_Get_HW_Prof_Flags_ExA function (cfgmgr32.h)

[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.

Syntax

CMAPI CONFIGRET CM_Get_HW_Prof_Flags_ExA(
  [in]           DEVINSTID_A pDeviceID,
  [in]           ULONG       ulHardwareProfile,
  [out]          PULONG      pulValue,
  [in]           ULONG       ulFlags,
  [in, optional] HMACHINE    hMachine
);

Parameters

[in] pDeviceID

Pointer to a NULL-terminated string that contains the device instance ID of the device for which to retrieve hardware profile-specific configuration flags.

[in] ulHardwareProfile

A variable of ULONG type that specifies the identifier of the hardware profile for which to retrieve configuration flags. If this parameter is zero, this function retrieves the configuration flags for the current hardware profile.

[out] pulValue

Pointer to a caller-supplied variable of ULONG type that receives zero or a bitwise OR of the following configuration flags that are defined in Regstr.h:

CSCONFIGFLAG_BITS

Bitwise OR of the other CSCONFIGFLAG_Xxx flags.

CSCONFIGFLAG_DISABLE

The device instance is disabled in the specified hardware profile.

CSCONFIGFLAG_DO_NOT_CREATE

The hardware profile does not support the specified device instance.

CSCONFIGFLAG_DO_NOT_START

The device cannot be started in the specified hardware profile.

[in] ulFlags

Reserved for internal use. Must be set to zero.

[in, optional] hMachine

A machine handle that is returned by call to CM_Connect_Machine or NULL. If this parameter is set to NULL, CM_Get_HW_Prof_Flags_Ex retrieves the configuration flags on the local machine.

Note  Using this function to access remote machines is not supported beginning with Windows 8 and Windows Server 2012, as this functionality has been removed.
 

Return value

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

Remarks

To retrieve a list of the hardware profile IDs that are currently defined on a remote machine, call SetupDiGetHwProfileListEx.

Functionality to access remote machines has been removed in Windows 8 and Windows Server 2012 and later operating systems thus you cannot access remote machines when running on these versions of Windows.

Note

The cfgmgr32.h header defines CM_Get_HW_Prof_Flags_Ex as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

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

See also

CM_Get_HW_Prof_Flags

SetupDiGetHwProfileFriendlyNameEx

SetupDiGetHwProfileListEx