ISensLogon2::SessionDisconnect method (sensevts.h)

The SessionDisconnect method is used to disconnect from a Fast User Switching session or a Remote Desktop Connection. This is different from logging off from a session, because when you use this method the session is disconnected.

Syntax

HRESULT SessionDisconnect(
  [in] BSTR  bstrUserName,
  [in] DWORD dwSessionId
);

Parameters

[in] bstrUserName

The name of a current user.

[in] dwSessionId

The session identifier of a session.

Return value

This method can return one of these values.

Return code Description
S_OK
The method returns successfully.

Remarks

SENS calls this method to notify an application that a session is disconnected.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header sensevts.h
DLL Sens.dll

See also

About System Event Notification Service

ISensLogon2

ISensLogon::Logoff

Terminal Services