Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than wtsapi32, prefix the name with the module name and a period.
static extern bool WTSRegisterSessionNotification(IntPtr hWnd, [MarshalAs(UnmanagedType.U4)] int dwFlags);
Declare Function WTSRegisterSessionNotification Lib "wtsapi32.dll" (ByVal hWnd as IntPtr, ByVal dwFlags as Int32) As Boolean
// constants that can be passed for the dwFlags parameter
const int NOTIFY_FOR_THIS_SESSION = 0;
const int NOTIFY_FOR_ALL_SESSIONS = 1;
// message id to look for when processing the message (see sample code)
const int WM_WTSSESSION_CHANGE = 0x2b1;
// WParam values that can be received:
const int WTS_CONSOLE_CONNECT = 0x1; // A session was connected to the console terminal.
const int WTS_CONSOLE_DISCONNECT = 0x2; // A session was disconnected from the console terminal.
const int WTS_REMOTE_CONNECT = 0x3; // A session was connected to the remote terminal.
const int WTS_REMOTE_DISCONNECT = 0x4; // A session was disconnected from the remote terminal.
const int WTS_SESSION_LOGON = 0x5; // A user has logged on to the session.
const int WTS_SESSION_LOGOFF = 0x6; // A user has logged off the session.
const int WTS_SESSION_LOCK = 0x7; // A session has been locked.
const int WTS_SESSION_UNLOCK = 0x8; // A session has been unlocked.
const int WTS_SESSION_REMOTE_CONTROL = 0x9; // A session has changed its remote controlled status.