I googled it and i found the messenger service works with mailslots , i tried a pretty newbie Net sender
with this function i made, but i found i can only use it in lan to mad my class...
the question is ... How can i use it over the internet? i mean i dont know what format to output to the mailslot to make it work, i tried IP and domain but it only works wih LAN aliases :(Code:int NetSend(char * to , char * Msg ,char * From ,char * faketo) { char path[MAX_PATH]; char Msgfinal[MAX_PATH]; HANDLE mailslot; DWORD written =0; sprintf( &path[0], "\\\\%s\\mailslot\\messngr",to); mailslot= CreateFile(path, GENERIC_WRITE,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); int fromlen,faketolen,msglen; fromlen=strlen(From); faketolen=strlen(faketo); msglen=strlen(Msg)+faketolen+fromlen+3; memset(&Msgfinal,0, sizeof(Msgfinal)); strcat(Msgfinal,From); Msgfinal[fromlen]=0; strcat(&Msgfinal[fromlen+1],faketo); Msgfinal[(fromlen+faketolen+1)]=0; strcat(&Msgfinal[fromlen+faketolen+2],Msg); WriteFile(mailslot,Msgfinal,msglen,&written,(LPOVERLAPPED)NULL); CloseHandle(mailslot); return written; }
Thanks in advantage.and sorry for my terrible english xD
EDIT:Sry i know its messy but im still a nub :)
EDIT2: the format is a formated char array(String) with the fields separated by null chars(0)
"from"-NULL-"Faketo"-NULL-"Msg"


Reply With Quote![[C++] Messenger service Mailslot](http://ragezone.com/hyper728.png)

