Windows Communicator
Tools
- Windows Communicator Registration Server
Tray application based on Interbase SQL Server. WC Registration
Server opens port 5600 and waits for Windows Communicator Clients
queries to display in their Network Dialog all available Windows
Communicator Servers available on the Internet.

Default Windows Communicator Registration Server is available
on WC author address 217.96.208.142 .
Windows Communicator Registration Server also registers Windows
Communicator users' Servers and allows to remove server from list,
update and so on...
For all Windows Communicator Registration Server updates,
inserts or removes events server sends reply to Windows
Communicator Server owner (registered Email).
WC Registration Server pings all registered WC Servers every 2
hours. If server is not available the server status is changed to
"not available" , if the server is not available 7 days,
WC Registration Server removes it from database.
Configuration file - WCRegServer.conf
#Interbase server path
[IBServer]
Path=d:\delphi\wincom.gdb
#RegServer adminstrator's smtp server - notification for clients
#"Server has been removed" etc.
[MailSettings]
FromText=From: "Windows Communicator Server" <admin@host.pl>
FromMail=admin@host.pl
SmtpHost=host.pl
Downloads
Windows Communicator plugins uses two modes (DLL export
functions)
1. Run as service - Windows Communicator browse \Plugins folder
for DLL libraries, then loads them into memory and executes
procedure RunPluginAsService (ParentApp : THandle;aLoggedUser: String; aUsersList : TtblUsers);StdCall;
This procedure is useful for permanent operations like timers,
schedulers, mail checking. Body of this procedure would looks like
that procedure RunPluginAsService (ParentApp : THandle;aLoggedUser: String; aUsersList : TtblUsers);StdCall;
Begin
aTimer := TTimer.Create;
aTimer.OnTimer := ShowMeMessageEveryMinute;
aTimer.Interval := 1000 * 60;
aTimer.Enabled :=true;
End; If your plugin doesn't needs timers leave this
procedure empty. 2. Run plugin - procedure RunPlugin (ParentApp : THandle;aLoggedUser: String; aSelUser : String;aUsersList : TtblUsers);StdCall; This
procedure is launched when user clicks on plugin item in Windows
Communicator menu.
This procedure should be used to display for example configuration
window if "Run as service" is used or just display any
window - games, exports users data to txt file and
others.... The rest of exported functions
- GetPluginCaption - information for Windows
Communicator menu builder - you should enter as result your
plugin name
Function GetPluginCaption : ShortString; Stdcall;
Begin
Result := 'My new plugin';
End;
- WriteSocketData (SocketID:Integer;SocketData:String); StdCall;
- this procedure is used by Windows Communicator Client to
post socket message to plugins. This message is send to every
plugin (DLL) from \Plugins folder.
Message flow looks as follows :
Plugin -----> WC Client1 -----> WC Server ----->WC
Client2 ----> Plugin
Example of communicating between plugins :
Sender :
procedure RunPlugin (ParentApp : THandle;aLoggedUser: String; aSelUser : String;aUsersList :
TtblUsers);StdCall;
Const
sSendMsg : = '050
%s|%s|'+#13#10;
Begin
PostMessage(aParentApp,wm_PluginSocketSend,
Longint(Format(sSendMsg,['Micheal','Hello Michael'),0);
End;
*) Michael is a user from aUsersList stringlist
**) If you want to send message to selected user just use
aSelUser
***) Every send information must contain message ID ('050
blehbleh.....
Warning! You can use message IDs from 030 up to 099 only,
all other numbers are reserved or ignored
Add "0" before you send message , and #13#10 as end
of message i.e.
sSendMsg : = '50 %s|%s|'; //----> incorrect
sSendMsg : = '050 %s|%s|'+#13#10; //----> correct
Use "|" as separator.
I suggest you to use JclStrings's function StrTokenToStrings
to decode message in receiver. JclStrings is available here.
Receiver :
procedure WriteSocketData (SocketID:Integer;SocketData:String); StdCall;
Begin
if SocketID = 50 then
ShowMessage('Incoming message : ' +SocketData);
End;
Downloads
|