IMMDeviceCollectionItem Method

Retrieves a pointer to the specified item in the device collection.

Definition

Namespace: DevCase.Win32.Interfaces
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
HResult Item(
	int deviceNumber,
	ref IMMDevice refDevice
)

Parameters

deviceNumber  Int32
The device number. If the collection contains n devices, the devices are numbered 0 to n– 1.
refDevice  IMMDevice
Pointer to a IMMDevice variable into which the method writes the address of the IMMDevice interface of the specified item in the device collection.

Through this method, the caller obtains a counted reference to the interface.

The caller is responsible for releasing the interface, when it is no longer needed, by calling the interface's Release method. If the Item call fails, refDevice is .

Return Value

HResult
If the method succeeds, it returns S_OK. If it fails, it returns an HResult value.

See Also