Device Parameters

Windows Media Device Manager uses device parameters to control the behavior of a device. These parameters are added to the registry as specified in the device's installation file (INF file). The following table lists the device parameters that Windows Media Device Manager queries.

Device parameter name Registry data type Description

Value that specifies the CLSID of the service provider controlling this device. This parameter is mandatory for PnP support.

The parameter value must be the CLSID, not the ProgID of the service provider. This parameter is mandatory to support Plug and Play (PnP) under Windows Media Device Manager. For more information, see Enabling PnP for Devices.

OptimalTransferSizeREG_DWORDOptional value that specifies the preferred transfer size that Windows Media Device Manager uses during read and write operations. If it is not supplied, a default transfer size is used.

Optional parameter that specifies whether Windows Media Device Manager organizes the content by metadata while presenting device content to applications. If not specified, the default value is 0.

When applications enumerate the content on the storages of a portable audio player, Windows Media Device Manager can present the content organized by metadata. This is especially useful for devices with large storage capacity.

Applications and devices have the ability to control this behavior. Devices indicate their preference through the device parameter UseMetadataViews.

The following two integer values are supported:

Requests that content be presented to the applications exactly as organized on the file system of the device.

Requests that the content be presented to the applications organized by metadata.

ShowInShellREG_DWORDOptional parameter that specifies whether the device should appear in Windows Explorer. The value 1 indicates that the device should appear in Windows Explorer. For more information, see Requirements for Portable Audio Players to Appear in Windows Explorer.

Optional parameter that alerts Windows Media Device Manager that the service provider supports IMDSPDevice3, IMDSPObject2, and IMDSPStorage4. Without this flag, Windows Media Device Manager will never call these interfaces. The value 1 indicates that these interfaces are supported.

This flag is required for service providers that synchronize with Windows Media Player. (See Enabling Synchronization with Windows Media Player).


Coding the INF file

The following example code from a device's INF file demonstrates setting some device parameters during device installation.

; Set parameters on Windows 95 and Windows 98 operating systems.

; Set parameters on Windows NT-based operating systems.

; Related section that specifies the device parameters.
; Add your own CLSID here.

Related topics

Creating a Service Provider
IMDServiceProvider2 Interface
IWMDMDevice Interface



Community Additions