If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > C++: does anyone know the code for net send?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-10-03, 17:48
blazefast blazefast is offline
Registered User
 
Join Date: Sep 2003
Posts: 1
Question C++: does anyone know the code for net send?

ive been trying to figure out what the C++ code is to use the net send command with strings. ive come up with something like this so far but the program will always use what i've typed, not whats contained in the strings when I try to put them in the parentheses.

#include <iostream.h>
#include <process.h>
#include <conio.h>
int main()
{
String user, message;
cout << "Enter the user name";
getline(cin, user);
cout << "Enter the message";
getline(cin, message);
system("net send user message");
return(0);
}
Reply With Quote
  #2 (permalink)  
Old 02-20-04, 06:44
Rick_xs7 Rick_xs7 is offline
Registered User
 
Join Date: Feb 2004
Location: Sydney, Australia
Posts: 1
I know this post is old but if you havent found it yet, try to concatanate like so:

system("net send " + user + " " + message);

NB: Dont leave out the spaces within the parentheses
Reply With Quote
  #3 (permalink)  
Old 07-15-11, 10:29
fmfmfm fmfmfm is offline
Registered User
 
Join Date: Jul 2011
Posts: 1
Net send

You can use WinExec for example. But using NET SEND is not secure. The command is not protected from spam: A Network Bomb. That's why it is disabled in Windows by default. I would recommend to not enable it
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On