-
Network usernames ...
Hi!
I want to make a program to talk to people in a network, so i'll be using the system net send command ... I've a couple of questions though:
does anyone know if there is a way I can actually check to see if people are online or not?? there are computer names of course, but if a user logs onto a computer, you can either send the message to the computer name, or the user name of the person whose on it. (I'm sure you all know this already). I just think it'd be a neat way of making a program, kinda like MSN/Googletalk but on a console :D
also, is there a better way of communication besides using net send?
thanks!
twomers
-
It is best to not use netsend. SP2 shuts it down my default so unless you want people who use your program to have to go through a long process to reenable it, I would suggest learning Winsock or another such api system and writing your own program entirely.
-
Here is a thread that should answer your question:
Searching User Currently Logged On
-
Hey,
thanks for that anonytmouse!! I tried searching through the forums beforehand to see if anyone had posted it, but I restricted it solely to the networking board .... either way ....
it's giving me this error:
error C2664: 'lstrcpyA' : cannot convert parameter 2 from 'unsigned char [16]' to 'const char *'
which is referring to this line:
Code:
lstrcpyA(szMachine, pNames[i].name);
hmmm, any ideas??
-
I originally compiled it with C. C++ has stricter type checking. In this case, you can just use a cast:
Code:
lstrcpyA(szMachine, (LPCSTR) pNames[i].name);