IWMDeviceManager2::GetDeviceFromCanonicalName (deprecated)
This is preliminary documentation and subject to change.
This topic documents a feature of the Windows Media Device Manager SDK. We recommend that you migrate your application to use the Windows Portable Devices API. For more information, see the Windows Portable Devices SDK.
The GetDeviceFromCanonicalName method retrieves an IWMDMDevice interface for a device with a specified canonical name. You can retrieve a device's canonical name by calling IWMDMDevice2::GetCanonicalName.
Syntax
HRESULT GetDeviceFromCanonicalName(
LPCWSTR pwszCanonicalName,
IWMDMDevice** ppDevice
);
Parameters
pwszCanonicalName
[in] A wide-character, null-terminated string specifying the canonical name of the device.
ppDeviceArray
[out] Pointer to a pointer to the IWMDMDevice interface of the device object with the specified canonical name. The caller must release this interface when done with it.
Return Values
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Value | Description |
E_INVALIDARG | The pwszCanonicalName or ppDeviceArray parameter is an invalid or NULL pointer. |
S_FALSE | There is no connected device found with canonical name pwszCanonicalName. |
Remarks
This method can be useful if an application implements IWMDMNotification, which sends a canonical name notification when a device connects or disconnects from the computer.
Requirements
Header: Defined in mswmdm.h.
Library: mssachlp.lib
See Also