Skip to content

Latest commit

 

History

History
135 lines (114 loc) · 5.4 KB

nf-mswmdm-imdserviceprovider3-setdeviceenumpreference.md

File metadata and controls

135 lines (114 loc) · 5.4 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:mswmdm.IMDServiceProvider3.SetDeviceEnumPreference
IMDServiceProvider3::SetDeviceEnumPreference (mswmdm.h)
The SetDeviceEnumPreference method sets the device enumeration preferences. (IMDServiceProvider3.SetDeviceEnumPreference)
IMDServiceProvider3 interface [windows Media Device Manager]
SetDeviceEnumPreference method
IMDServiceProvider3.SetDeviceEnumPreference
IMDServiceProvider3::SetDeviceEnumPreference
IMDServiceProvider3SetDeviceEnumPreference
SetDeviceEnumPreference
SetDeviceEnumPreference method [windows Media Device Manager]
SetDeviceEnumPreference method [windows Media Device Manager]
IMDServiceProvider3 interface
mswmdm/IMDServiceProvider3::SetDeviceEnumPreference
wmdm.imdserviceprovider3_setdeviceenumpreference
wmdm\imdserviceprovider3_setdeviceenumpreference.htm
WMDM
f3807e80-82ea-437e-ab30-bd00bc0fc6ad
12/05/2018
IMDServiceProvider3 interface [windows Media Device Manager],SetDeviceEnumPreference method, IMDServiceProvider3.SetDeviceEnumPreference, IMDServiceProvider3::SetDeviceEnumPreference, IMDServiceProvider3SetDeviceEnumPreference, SetDeviceEnumPreference, SetDeviceEnumPreference method [windows Media Device Manager], SetDeviceEnumPreference method [windows Media Device Manager],IMDServiceProvider3 interface, mswmdm/IMDServiceProvider3::SetDeviceEnumPreference, wmdm.imdserviceprovider3_setdeviceenumpreference
mswmdm.h
Windows
Mssachlp.lib
Windows
19H1
IMDServiceProvider3::SetDeviceEnumPreference
mswmdm/IMDServiceProvider3::SetDeviceEnumPreference
c++
APIRef
kbSyntax
COM
mssachlp.lib
mssachlp.dll
IMDServiceProvider3.SetDeviceEnumPreference

IMDServiceProvider3::SetDeviceEnumPreference

-description

The SetDeviceEnumPreference method sets the device enumeration preferences.

-parameters

-param dwEnumPref [in]

Contains a bitwise OR combination of one or more of the following bit values that specify enumeration preference. Each set bit enables the corresponding extended behavior, whereas the absence of that bit disables the extended behavior and specifies the default, backward-compatible enumeration behavior. The possible values for dwEnumPref are provided in the following table.

Value Description
DO_NOT_VIRTUALIZE_STORAGES_AS_DEVICES By default, for devices containing multiple storage media, each of these storages enumerates as a separate pseudo-device. However, when this bit is set, storages are not visible as devices, and only devices are visible as devices.
ALLOW_OUTOFBAND_NOTIFICATION By default, the IWMDMNotification callback mechanism provides applications with device arrival and removal events. When this bit is set, the service provider is free to notify the application by a separate mechanism, such as by using a window message. This behavior is in addition to the Windows Media Device Manager notifications. This flag does not suppress Windows Media Device Manager notifications.

-returns

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
E_INVALIDARG
The dwEnumPref parameter contains an unsupported bit value.
WMDM_E_CALL_OUT_OF_SEQUENCE
The method was called after an enumeration operation. It must be called before the enumeration operation.

-remarks

This API provides clients the ability to override the default device enumeration behavior of Windows Media Device Manager.

Client applications must call this method immediately after creating the device manager object by querying for the IWMDeviceManager interface from Windows Media Device Manager. The call must be made before any enumeration occurs, either explicitly or implicitly as a result of another operation.

After a preference flag is set, it cannot be changed for the lifetime of the application (not just the lifetime of the Windows Media Device Manager object). Attempting to change a preference flag will result in an error. Calling this API again with the same flag settings does not return an error, and also does have any effect on enumeration.

The DO_NOT_VIRTUALIZE_STORAGES_AS_DEVICES flag has to be honored by the service provider to take effect. It is possible that, despite this flag, some devices are enumerated as a device-per-storage.

-see-also

IMDServiceProvider3 Interface