ISendMessage Method: SendMessageToComputer

SendMessageToComputer
(
 ComputerName  As  String,
 Message  As  String,
 [SourceComputer As  String]
 );

Parameters

[in] String ComputerName
Name of the computer to which the message is to be sent.

[in] String Message
Message string to be sent to the computer.

[in] String SourceComputerName
Name of the computer where the send call is to be executed. This parameter is optional. If this parameter is not specified, the call is executed on the current computer.

Description
Sends the given message to the specified computer.

Example

Dim SendMsg As ISendMessage
'Get the ISendMessage interface.
Set SendMsg = CreateObject ("DirectScript.SendMessage.1")
'Send a message to the EARTH computer.
SendMsg.SendMessageToComputer "\\EARTH", "This is test message", "\\MOON"

See Also