IWSDDeviceProxy::Init method (wsdclient.h)
Initializes the device proxy, optionally sharing a session with a previously initialized sponsoring device proxy.
Syntax
HRESULT Init(
[in] LPCWSTR pszDeviceId,
[in] IWSDAddress *pDeviceAddress,
[in] LPCWSTR pszLocalId,
[in, optional] IWSDXMLContext *pContext,
[in, optional] IWSDDeviceProxy *pSponsor
);
Parameters
[in] pszDeviceId
The logical address (ID) of the device.
[in] pDeviceAddress
Reference to an IWSDAddress object that contains the device configuration data.
[in] pszLocalId
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.
[in, optional] pContext
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.
[in, optional] pSponsor
Reference to an IWSDDeviceProxy object that is an optional device with which to share a session and lower layers.
Return value
Possible return values include, but are not limited to, the following:
Return code | Description |
---|---|
|
Method completed successfully. |
|
pszDeviceId is NULL, pszLocalId is NULL, or the length in characters of either identifier string exceeds WSD_MAX_TEXT_LENGTH (8192). |
|
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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | wsdclient.h (include Wsdapi.h) |
DLL | Wsdapi.dll |