IWSDDeviceHost::Terminate method (wsdhost.h)

Terminates the host and releases any attached services. If a notification sink was passed to the Start method, then the notification sink is released.

Syntax

HRESULT Terminate();

Return value

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

Return code Description
S_OK
Method completed successfully.
E_FAIL
The host is uninitialized or the host has already been terminated.

Remarks

Services and notification sinks will not receive messages after the Terminate method has completed.

If this device host was started by calling IWSDDeviceHost::Start, it must first be stopped by calling IWSDDeviceHost::Stop before Terminate can be called.

Terminate must be called before releasing the IWSDDeviceHost.

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