Click to See Complete Forum and Search --> : messanger service
stajpus
February 27th, 2003, 03:25 PM
how can I use the messanger service (in MS windows 2000/xp) to
programmatically
send and receive messages in a LAN?
or how can I send messages thak can be received by the messanger service or winpopup (on win98)?
thank you
filthy_mcnasty
February 27th, 2003, 04:12 PM
do some string manipulation with what you want to send and simply use CreateProcess, ShellExecute or WinExec (try avoiding the last one though)
char temp[1024];
wsprintf(temp, "c:\\windows\\system32\\netsend \"%s\" %s", ip, text);
where ip is the ip to send to *obviously* and text is the message.
Mick
February 27th, 2003, 05:14 PM
Or use the WIN32 call.
NetMessageBufferSend(...)
filthy_mcnasty
February 27th, 2003, 05:28 PM
wow wish i knew about that api back when i was playing with that stuff. i'd go with mick's suggestion, looks more complete than mine. that gets to be the one thing i learned today!
Mick
February 27th, 2003, 05:44 PM
Just doing my part to help (advertising) people annoy all those that connect to the 'internet' and don't turn off the messenger service or reject the connection via firewall(s) ;) Though it leads me to the question...in NT you could turn off rec'ing messages I think it was net send message off (or something like that), but in windoze 2000 you can't...
Ahh well.
mwilliamson
February 27th, 2003, 07:11 PM
NetBufferSend / net send are only available on Windows NT. If you want to send messages from windows, you should open the messngr mail slot and directly write to it. To recieve messages, you need to listen on the messngr mail slot.
To stop recieving messages on Windows NT, disable the Messenger service. On Windows, to recieve messages you need to start Win-popup.
stajpus
February 28th, 2003, 02:48 AM
Originally posted by mwilliamson
NetBufferSend / net send are only available on Windows NT. If you want to send messages from windows, you should open the messngr mail slot and directly write to it. To recieve messages, you need to listen on the messngr mail slot.
how do I open or listen on the messngr mail slot? could you suggest me a tutorial or something on the subject?
thanx
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.