WTSSendMessage
[DllImport("wtsapi32.dll", SetLastError = true)]
public static extern bool WTSSendMessage(
IntPtr hServer,
int SessionId,
string pTitle,
int TitleLength,
string pMessage,
int MessageLength,
int Style,
int Timeout,
ref int pResponse,
bool bWait
);
Microsoft documentation: Link
Last updated