Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "WTSSendMessage" in [All]

wtsapi32

.

$wtsSendMessagesig = @'

.

     public static extern bool WTSSendMessage(

.

$wtsmessage = Add-Type -MemberDefinition $wtsSendMessagesig -name PSWTSSendMessage -Namespace GetLoggedOnUsers -PassThru

.

     $wtsmessage::WTSSendMessage($server, $element.SessionID,$messageTitle,$messageTitle.Length,$message,$message.Length,0,$timeout,[ref]$resp,$true)

.
Summary
The WTSSendMessage function displays a message box on the client desktop of a specified Terminal Services session.
.

static extern bool WTSSendMessage(

.

  Private Shared Function WTSSendMessage(ByVal hServer As IntPtr, ByVal SessionId As Int32, ByVal title As String, ByVal titleLength As UInt32, ByVal message As String, ByVal messageLength As UInt32, ByVal style As UInt32, ByVal timeout As UInt32, ByRef pResponse As UInt32, ByVal bWait As Boolean) As Boolean

.

    public static extern bool WTSSendMessage(

.

    result = WTSSendMessage(WTS_CURRENT_SERVER_HANDLE, WTS_CURRENT_SESSION, title, tlen, msg, mlen, 0, 0, out resp, false);

.

            public static extern bool WTSSendMessage(

.

                $MessageBox::WTSSendMessage(0, $sessionId, $title, $titleLength, $message, $messageLength, $buttonSet, $timeout, [ref] $response, $waitResponse)

.
Documentation
[WTSSendMessage] on MSDN

 
Access PInvoke.net directly from VS: