Skip to content

Latest commit

 

History

History
174 lines (140 loc) · 5.33 KB

nf-wsdhost-iwsddevicehost-init.md

File metadata and controls

174 lines (140 loc) · 5.33 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wsdhost.IWSDDeviceHost.Init
IWSDDeviceHost::Init (wsdhost.h)
Initializes an instance of an IWSDDeviceHost object.
IWSDDeviceHost interface
Init method
IWSDDeviceHost.Init
IWSDDeviceHost::Init
Init
Init method
Init method
IWSDDeviceHost interface
ncd.iwsddevicehost_init_method
wsdhost/IWSDDeviceHost::Init
ncd\iwsddevicehost_init_method.htm
ncd
a66f0600-0bac-4bef-af43-6db60b60605e
12/05/2018
IWSDDeviceHost interface,Init method, IWSDDeviceHost.Init, IWSDDeviceHost::Init, Init, Init method, Init method,IWSDDeviceHost interface, ncd.iwsddevicehost_init_method, wsdhost/IWSDDeviceHost::Init
wsdhost.h
Wsdapi.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
WsdHost.idl
Wsdapi.dll
Windows
19H1
IWSDDeviceHost::Init
wsdhost/IWSDDeviceHost::Init
c++
APIRef
kbSyntax
COM
Wsdapi.dll
IWSDDeviceHost.Init

IWSDDeviceHost::Init

-description

Initializes an instance of an IWSDDeviceHost object, which is the host-side representation of a device.

-parameters

-param pszLocalId [in]

The logical or physical address of the device. A logical address is of the form urn:uuid:{guid}. If pszLocalId is a logical address, the host will announce the logical address and then convert the address to a physical address when it receives Resolve or Probe messages.

If pszLocalId is a physical address (such as URL prefixed by http or https), the host will use the address as the physical address and will host on that address instead of the default one.

For secure communication, pszLocalId must be an URL prefixed by https, and the host will use the SSL/TLS protocol on the port specified in the URL. The recommended port is port 5358, as this port is reserved for secure connections with WSDAPI. If no port is specified, then the host will use port 443. The host port must be configured with an SSL server certificate. For more information about the configuration of host ports, see HttpSetServiceConfiguration.

Any URL (http or https) must be terminated with a trailing slash. The URL must contain a valid IP address or hostname.

The following list shows some example values for pszLocalId. It is not a complete list of valid values.

-param pContext [in, optional]

An IWSDXMLContext interface that defines custom message types or namespaces.

-param ppHostAddresses [in, optional]

A single IWSDAddress object or IWSDTransportAddress object. The objects provide information about specific addresses that the host should listen on.

If pszLocalId contains a local address, the resulting behavior is a mapping between the logical address and the supplied physical address (instead of a mapping between the logical address and the default physical address).

-param dwHostAddressCount [in, optional]

The number of items in the ppHostAddresses array. If ppHostAddresses is an IWSDAddress interface, count must be 1.

-returns

Possible return values include, but are not limited to, the following:

Return code Description
S_OK
Method completed successfully.
E_INVALIDARG
pszLocalId is NULL, the length in characters of pszLocalId exceeds WSD_MAX_TEXT_LENGTH (8192), or the number of addresses referenced by ppHostAddresses does not match dwHostAddressCount.
E_FAIL
The device host is in an unexpected state.
E_OUTOFMEMORY
Insufficient memory to complete the operation.
E_ABORT
Initialization could not be completed.

-remarks

This method is called by WSDCreateDeviceHost and need not normally be called directly by your code.

-see-also

IWSDDeviceHost