IPortableDeviceDispatchFactory::GetDeviceDispatch method
Instantiates a WPD Automation Device object for a given WPD device identifier.
Syntax
HRESULT GetDeviceDispatch(
[in] LPCWSTR pszPnPDeviceID,
[out] IDispatch **ppDeviceDispatch
);
Parameters
- pszPnPDeviceID [in]
-
A pointer to a String that is used by Plug-and-play to identify a currently connected WPD device. The Plug and Play (PnP) identifier for a particular device can be obtained from the IPortableDeviceManager::GetDevices method in the WPD C++/COM API.
- ppDeviceDispatch [out]
-
Contains a pointer to the IDispatch implementation for the WPD Automation Device object.
Return value
The possible return codes include, but are not limited to, the values shown in the following table.
| Return code | Description |
|---|---|
|
The method succeeded. |
Remarks
For an example of how to use GetDeviceDispatch method to instantiate a WPD Automation Device object, see Instantiating the WPD Automation Factory Interface.
Requirements
|
Minimum supported client | Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server | Windows Server 2008 R2 [desktop apps | Windows Store apps] |
|
Header |
|
|
Library |
|
See also
- Device Object
- Instantiating the WPD Automation Factory Interface
- IPortableDeviceDispatchFactory Interface