I do not know if this works under Win89, but its a cool way to send messages over the network

Code: Select all
Sender.s="srings";Source (ME)
Reciepent.s="Ringsnb2" ;Destination, here my Notebook
Reciepent.s="*" ;BroadCast to all in network :)
Message.s="This is a Testmessage ! " ;The Message
Needed=Len(Sender.s)+Len(Reciepent.s)+Len(Message.s)+4 ;Calculate the needed Memory
buff = AllocateMemory(needed);and allocate them
If Buff
;Set the Data to our buffer
PokeS(Buff,Sender)
PokeS(Buff+Len(Sender.s)+1,Reciepent.s)
PokeS(Buff+Len(Sender.s)+Len(Reciepent)+2,Message.s)
SlotName.s = "\\" + Reciepent.s + "\mailslot\messngr"
hFile = CreateFile_(@SlotName.s, #GENERIC_WRITE, #FILE_SHARE_READ, 0, #OPEN_EXISTING, #FILE_ATTRIBUTE_NORMAL, 0)
byteswritten=0
If HFile
Result=WriteFile_(hFile, buff, Needed, @byteswritten, 0)
If Result
MessageRequester("Info","Message written to "+Slotname.s+" : "+ Str(byteswritten),0)
EndIf
CloseHandle_(hFile)
Else
MessageRequester("Info","problem with Slotname:"+Slotname.s,0);Error
EndIf
FreeMemory(Buff);Free Memory
EndIf