IWTSProtocolManager::NotifyServiceStateChange method (wtsprotocol.h)

[IWTSProtocolManager::NotifyServiceStateChange is no longer available for use as of Windows Server 2012. Instead, use IWRdsProtocolManager::NotifyServiceStateChange.]

Notifies the protocol provider that the state of the Remote Desktop Services service is changing.


HRESULT NotifyServiceStateChange(
  [in] WTS_SERVICE_STATE *pTSServiceStateChange


[in] pTSServiceStateChange

A pointer to a WTS_SERVICE_STATE structure that specifies whether the service is starting, stopping, or changing its drain state.

Return value

When you are implementing this method, return S_OK if the function succeeds. If it fails, return an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.


Minimum supported client None supported
Minimum supported server Windows Server 2008 R2
Target Platform Windows
Header wtsprotocol.h

See also