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.
CMAPI CONFIGRET WINAPI CM_Add_Empty_Log_Conf( _Out_ PLOG_CONF plcLogConf, _In_ DEVINST dnDevInst, _In_ PRIORITY Priority, _In_ ULONG ulFlags );
- plcLogConf [out]
Address of a location to receive the handle to an empty logical configuration.
- dnDevInst [in]
Caller-supplied device instance handle that is bound to the local machine.
- Priority [in]
Caller-supplied configuration priority value. This must be one of the constant values listed in the following table. The constants are listed in order of priority, from highest to lowest. (For multiple configurations with the same ulFlags value, the system will attempt to use the one with the highest priority first.)
Priority Constant Definition
Result of a forced configuration.
Result of a boot configuration.
Preferred configuration (better performance).
Workable configuration (acceptable performance).
For internal use only.
Not a desirable configuration, but it will work.
For internal use only.
The system must be restarted
The system must be restarted (same as LCPRI_RESTART).
The system must be shut down and powered off.
A jumper must be changed.
The configuration cannot be changed.
The configuration cannot exist.
- ulFlags [in]
Caller-supplied flags that specify the type of the logical configuration. One of the following flags must be specified.
Configuration Type Flags Definitions
Resource descriptors added to this configuration will describe a basic configuration.
Do not use. (Only the PnP manager can create a filtered configuration.)
Do not use. (Only the PnP manager can create an allocated configuration.)
Resource descriptors added to this configuration will describe a boot configuration.
Resource descriptors added to this configuration will describe a forced configuration.
Resource descriptors added to this configuration will describe an override configuration.
One of the following bit flags can be ORed with the configuration type flag.
Priority Comparison Flags Definitions
If multiple configurations of the same type (ulFlags) have the same priority (Priority), this configuration is placed at the head of the list.
(Default) If multiple configurations of the same type (ulFlags) have the same priority (Priority), this configuration is placed at the tail of the list.
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_Add_Empty_Log_Conf 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.
Calling CM_Add_Empty_Log_Conf can cause the handles returned by CM_Get_First_Log_Conf and CM_Get_Next_Log_Conf to become invalid. Thus if you want to obtain logical configurations after calling CM_Add_Empty_Log_Conf, your code must call CM_Get_First_Log_Conf again and start at the first configuration.
To remove a logical configuration created by CM_Add_Empty_Log_Conf, call CM_Free_Log_Conf.
The handle received in plcLogConf must be explicitly freed by calling CM_Free_Log_Conf_Handle.
Callers of this function must have SeLoadDriverPrivilege. (Privileges are described in the Microsoft Windows SDK documentation.)
For information about using device instance handles that are bound to the local machine, see CM_Get_Child.
|Available in Microsoft Windows 2000 and later versions of Windows.|
Build date: 11/16/2013