This example shows how to broadcast system alerts using the NetMessageBufferSend as an alternative to NET SEND command.
On Windows XP computer, make sure that the Messenger service is running:
If the Messenger service is not running, upon creating an instance of the NetMessages object you will get error code 2184 (The service has not been started).
Sometimes it takes time for the NetMessageBufferSend to return control. The mailslot approach turns around much faster.
Use [domain name]* to broadcast a message to all domain computers.
On the target computer, TCP port 139 (NetBIOS) is assigned to receive messages.
* * *
C# version contains classes NetMessage and NetMessageThread.
The first class sends messages while staying in the main thread of the calling process. Exactly as FoxPro does. It causes the process wait until the NetMessageBufferSend returns. Sometimes this delay becomes noticeable -- up to 1 minute -- especially when the message receipient is disconnected or the network name is invalid or does not exist.
The NetMessageThread class sends messages using a separate thread it creates for each message. The calling process immediately gets the control back, because the delay belongs to another thread.
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
AceHTML Freeware
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc.