WsResetServiceHost function

Resets service host so that it can be opened again.

Rather the creating a new service host from scratch WsResetServiceHost provides a convenient way to reuse service host. Specifically in a scenario where a service host has to go through close and open on a regular basis, this allows for an efficient way for reusing the same service host. It resets the underlying channel and listeners for reuse.

Syntax


HRESULT WINAPI  WsResetServiceHost(
  _In_     WS_SERVICE_HOST *serviceHost,
  _In_opt_ WS_ERROR        *error
);

Parameters

serviceHost [in]

The service host to reset.

error [in, optional]

Specifies where additional error information should be stored if the function fails.

Return value

This function can return one of these values.

Return codeDescription
WS_E_INVALID_OPERATION

The serviceHost was in an inappropriate state.

E_INVALIDARG

One or more arguments are invalid.

 

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

WebServices.h

Library

WebServices.lib

DLL

WebServices.dll

 

 

Community Additions

ADD
Show: