IWSDDeviceHost::Start method (wsdhost.h)

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(
  [in]           ULONGLONG            ullInstanceId,
  [in]           const WSD_URI_LIST   *pScopeList,
  [in, optional] IWSDDeviceHostNotify *pNotificationSink
);

Parameters

[in] ullInstanceId

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).
 

[in] pScopeList

Scope of the device host. If NULL, no scopes are associated with the host.

[in, optional] pNotificationSink

Reference to an IWSDDeviceHostNotify object that specifies the notification sink.

Return value

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

Return code Description
S_OK
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 Init to initialize a device host.
E_ABORT
There is no metadata associated with the host.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wsdhost.h (include Wsdapi.h)
DLL Wsdapi.dll

See also

IWSDDeviceHost