The Message API function sends messages. The function requires that the local computer be running the Workstation service.
NetMessageBufferSend requires the Messenger service to be running only on the computer that receives the message. The Message category functions, data types, structures, and constants are defined in the netcons.h, neterr.h, and message.h header files. A source program can access these definitions by defining the constants INCL_NETERRORS and INCL_NETMESSAGE, and including the lan.h master header file.
The Message API function follows:
|
Function |
Description |
|
Sends a buffer of information to a registered user on a specified computer or to all members of a domain. |
A message is any file or buffer of data sent to a user or application on the network. A message name table contains a list of registered message aliases (users and applications) permitted to receive messages and a list of aliases to which a message can be forwarded.
To send a message, an application can call NetMessageBufferSend. NetMessageBufferSend sends a buffer of information. Applications can also send broadcast messages to all users in a domain or NetMessageBufferSend.
The following example shows the contents of a message log file containing two messages:
Message from JOHN to BRUCE on October 01, 1994, 14:05:20
Hello, this is a BUFFER test message.
****
Message from BRUCE to JOHN on October 01, 1994, 14:11:48
Hello, this is a FILE test message.
****
Note A process must open the message log in read-only/deny-none mode; otherwise, the Messenger service fails when trying to log incoming messages.
By default, Advanced Server accepts only two names, the name of the workstation and the name of the user in the message name table.