IWSDDeviceProxy::Init (Compact 2013)
3/26/2014
This method initializes the device proxy, optionally sharing a session with a previously initialized sponsoring device proxy.
Syntax
HRESULT Init(
LPCWSTR pszDeviceId,
IWSDAddress* pDeviceAddress,
LPCWSTR pszLocalId,
IWSDXMLContext* pContext,
IWSDDeviceProxy* pSponsor
);
Parameters
- pszDeviceId
[in] The logical address (ID) of the device.
- pDeviceAddress
[in] Reference to an IWSDAddress object that contains the device configuration data.
- pszLocalId
[in] The logical address of the client. The logical address is of the form, urn:uuid:{guid}. Used when the server needs to initiate a connection to the client.
pContext
[in, optional] Reference to an IWSDXMLContext object that defines custom message types or namespaces.If NULL, a default context representing the built-in message types and namespaces is used.
- pSponsor
[in, optional] Reference to an IWSDDeviceProxy object that is an optional device with which to share a session and lower layers.
Return Value
The following table shows the possible error code return values.
Error code |
Description |
---|---|
S_OK |
This method completed successfully. |
E_INVALIDARG |
pszDeviceId is NULL, pszLocalId is NULL, or the length in characters of either identifier string exceeds WSD_MAX_TEXT_LENGTH (8192). |
E_OUTOFMEMORY |
Insufficient memory to complete the operation. |
Remarks
This method is called by WSDCreateDeviceProxy and need not normally be called directly by the client code.
Requirements
Header |
wsdapi.h |
Library |
wsdapi.lib |