SendBroadcastMessage

Sends a broadcast message to the specified logical connections on the server (For cross-platform functionality, see Developing NLMs with Cross-Platform Functions ( NDK: NLM Development Concepts, Tools, and Functions) and call NWSendBroadcastMessage)

Local Servers:N/A
Remote Servers:blocking
Classification:3.x, 4.x, 5.x, 6.x
Service:Server-Based Message

Syntax

  #include <\nlm\nit\nwmsg.h>  
   
  int SendBroadcastMessage (  
     char   *message,  
     WORD   *connectionList,  
     BYTE   *resultList,  
     WORD   connectionCount); 
  

Parameters

message
(IN) String containing the message to be sent (58 characters, including the NULL terminator).
connectionList
(IN) List of connection numbers to which the message is to be broadcast.
resultList
(OUT) Receives a result (status) code for each connection number contained in connectionList.
connectionCount
(IN) Maximum number of connections to which the requesting workstation wants to send the message.

Return Values

The following table lists return values and descriptions.

Value

Hex

Name

Description

0

(0x00)

ESUCCESS

 

150

(0x96)

ERR_SERVER_OUT_OF_MEMORY

 

254

(0xFE)

ERR_IO_FAILURE

Lack of Dynamic Workspace

Remarks

The application must check that the message does not exceed 58 characters and that it does not contain characters with ASCII values less than 0x20 or greater than 0x7E.

The connectionList parameter specifies the connection number of each station. Each byte in the connectionList field has a corresponding byte in resultList.

The resultList parameter returns a result code for each connection number contained in the connectionList field. The following result codes are defined:

Code

Description

0x00

Successful. The server stored the message in the target connection’s message buffer. (It is the target connection’s responsibility to retrieve and display the message.)

0xFC

Rejected. The target connection’s message buffer is already holding a message.

0xFD

Invalid Connection Number. The specified connection number is unknown.

0xFF

Blocked. The target connection’s message mode is set to block messages, or the target connection is not in use.

See Also

GetBroadcastMessage, GetConnectionInformation, GetConnectionNumber