IWSDDeviceHost::Stop method (wsdhost.h)

Sends a WS-Discovery Bye message and stops the host. After a host has been successfully stopped, it must be terminated with IWSDDeviceHost::Terminate before being released.

Syntax

HRESULT Stop();

Return value

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

Return code Description
S_OK
Method completed successfully.
S_FALSE
The host has already stopped.
E_FAIL
The host is not initialized or the host is not started.

Remarks

When a device host is stopped using this method, all services remain attached but no inbound messages are processed or otherwise handled.

Calling Stop is not necessary if the host has not been started.

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