This documentation is archived and is not being maintained.

SessionEndingEventArgs Class

Provides data for the SessionEnding event.

For a list of all members of this type, see SessionEndingEventArgs Members.


[Visual Basic]
Public Class SessionEndingEventArgs
   Inherits EventArgs
public class SessionEndingEventArgs : EventArgs
public __gc class SessionEndingEventArgs : public EventArgs
public class SessionEndingEventArgs extends EventArgs

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


A SessionEnding event is raised when the user is trying to log off or shut the system down.

This is a cancellable event and setting the Cancel property to false will request that the session continues to run. Making such a request provides no guarantee that the session will not end.


Namespace: Microsoft.Win32

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System (in System.dll)

See Also

SessionEndingEventArgs Members | Microsoft.Win32 Namespace | SystemEvents