
Softros LAN Messenger SDK (Software Development Kit) provides headers, libraries, and examples for embedding message sending functionality to your software. The SDK requires:
Softros LAN Messenger provides access to its APIs via MessengerAPIx86.dll and MessengerAPIx64.dll dynamic link libraries for x86 and x64 architectures. The ARM architecture is not supported. Libraries are included in Softros LAN Messenger installation and located in \SDK\DLLs\ subfolder. Usage examples in C#, C++, and Delphi programming languages can be found in \SDK\DLLs\Examples\ subfolder.
Currently, SDK provides the only function – SendMessage that can be used to send a message to a user from the Softros LAN Messenger user list.
uint SendMessage( recipientTypeEnum recipientType, string recipientValue, string MsgText );
DWORD SendMessage( [in] recipientTypeEnum recipientType, [in] const wchar_t* recipientValue, [in] const wchar_t* MsgText );
function
SendMessage(recipientType: DWORD; recipientValue: PWideChar; MsgText: PWideChar): DWORD;
stdcall;
recipientType
[in] recipientType
recipientType:
public enum recipientTypeEnum { UID = 0, IP = 1, PCName = 2, UserName = 3, Group = 4, All = 5 }
enum class recipientTypeEnum { UID = 0, IP = 1, PCName = 2, UserName = 3, Group = 4, All = 5 };
//cast to DWORD
type
TrecipientTypeEnum = (UID, IP, PCName, UserName, Group, All);
The type of recipient. See Recipient Types for details.
string recipientValue
[in] const wchar_t* recipientValue
recipientValue: PWideChar
The recipient. The format depends on the value of the recipientType. See
Recipient Types for details. Can be NULL only if the value of
recipientType is All.
string MsgText
[in] const wchar_t* MsgText
MsgText: PWideChar
The message text.
If the function succeeds, the return value is zero. If the function fails, the return value is one of the following error codes:
Code | Description | Possible remedy |
---|---|---|
1 | Error: The recipient has not been found. | Wrong name of the recipient. Please double-check its UID, name or address along with case sensitivity where applicable. |
2 | Error: The SDK API is not enabled in the Admin.ini. | Enable it by setting the AllowSDKAPI parameter to 1. |
3 | Error: Softros LAN Messenger is not running. | Check if Softros LAN Messenger is installed and running |
Successful execution of the function does not guarantee the message has been received by the recipient. For example, in case the recipient is offline, the message is stored for later delivery.