Is it possible to make a C++ program that executes MS-DOS commands like "net send <ip> <message>"??
If it is, would somebody please show me a little example
Thanks in advance....
-//Marc -//MipZhaP
Is it possible to make a C++ program that executes MS-DOS commands like "net send <ip> <message>"??
If it is, would somebody please show me a little example
Thanks in advance....
-//Marc -//MipZhaP
Just put the command you want executed as a parameter in the system command.
Code:#include <stdlib> int main(void) { char command[] = "cls" system(command); // These two lines do the system("cls"); // same thing - clear the screen return 1; }
if you are planinng to do a net send version of this with a list of 100's of IP's then you better using threading since each of those net send command will take time to execute and doing it sequentially can take ages...
Would it really make much of a difference, if any? When you do two threads it executes each one simultaneously, but it does each one at half the speed, no?
Okey.. I've looked at your fine example, and I've been testing it with a single net send message. It works perfectly, but when I open the program the message pops up approx. 1 min. later, and that's a bit slow..
So my question is, is there anything to do about this "slowdown"?
Last edited by MipZhaP; 08-17-2004 at 07:52 AM.
There's nothing that I can think of in C++, but I'm not familiar with netsend. Vasanth, however, seems to know what he's talking about - I'd be interested to see what he has to say.
edit: Actually - if you're sending data over the internet, it may just be because of the time lapse while sending data between the two computers.
get a faster network.Originally Posted by MipZhaP
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
sean_mackrory: Yeah, it looks like he knows something about this subject
major_small: A normal net send msg takes < 1ms, sooo you might be wrong in your "thrown out statement".. My network isn't slow...
I am not sure how net send exactly works but my guess is it has to do some broadcast lookup to find the machine (not sure abt this) which might take time the first time the message is sent to a particular host...
I regularly use net send and have noticed random delays and some times the message is never sent....
[rant]
and thanx to the person who gave me rep-- for my last post....
[/rant]
Okey, thx for your answer