IWSDDeviceHost::Start (Compact 2013)
3/26/2014
This method starts the device host and publishes the device host using a WS-Discovery Hello message. If a notification sink is passed to this method, then the notification sink is also registered. After Start has been called successfully, the device host will automatically respond to Probe and Resolve messages.
Syntax
HRESULT Start(
ULONGLONG ullInstanceId,
const WSD_URI_LIST* pScopeList,
IWSDDeviceHostNotify* pNotificationSink
);
Parameters
ullInstanceId
[in] The instance identifier. If no identifier is provided, the current instance value + 1 is used as the default.Note
For compatibility with the WS-Discovery specification, this value must be less than or equal to UINT_MAX (4294967295).
- pScopeList
[in] Scope of the device host. If NULL, no scopes are associated with the host.
- pNotificationSink
[in, optional] Reference to an IWSDDeviceHostNotify object that specifies the notification sink.
Return Value
The following table shows the possible error code return values.
Error code |
Description |
---|---|
S_OK |
This method completed successfully. |
S_FALSE |
The device host has already been started. |
E_FAIL |
The method failed. It may have failed because the host has not been initialized. Call IWSDDeviceHost::Init to initialize a device host. |
E_ABORT |
There is no metadata associated with the host. |
Requirements
Header |
wsdapi.h |
Library |
wsdapi.lib |