473,387 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Sending arguments to an excutable

Hi All,

I am not sure if this is the right group, but a have an executable
(written in C++) and I am trying to pass arguments into it.

i.e. \\server\simple.exe 10

will work in the Start->run

But when I send it as a <A HREF="\\server\simple.exe 10"> Link </A> in
a HTML e-mail, no luck. It says it could not find the file or starts
it without passing in any arguments.

I have been looking all over for help (I have tried simple.exe?10 as
well), but not nothing has worked so far. Any help would be much
appreciated.

Regards,

Marek

Jul 23 '05 #1
7 1256
si*******@gmail.com wrote:
I am not sure if this is the right group,
It's not.
but a have an executable
(written in C++) and I am trying to pass arguments into it.

i.e. \\server\simple.exe 10

will work in the Start->run
You must be doing something right AFA C++ is concerned.
But when I send it as a <A HREF="\\server\simple.exe 10"> Link </A> in
a HTML e-mail, no luck. It says it could not find the file or starts
it without passing in any arguments.

I have been looking all over for help (I have tried simple.exe?10 as
well), but not nothing has worked so far. Any help would be much
appreciated.


Post your HTTP question to comp.infosystems.www.authoring.cgi. You need
to learn the "common gateway interface" (CGI), and it's not part of C++
language.

V
Jul 23 '05 #2
si*******@gmail.com wrote:
Hi All,

I am not sure if this is the right group, but a have an executable
(written in C++) and I am trying to pass arguments into it.

i.e. \\server\simple.exe 10

will work in the Start->run

But when I send it as a <A HREF="\\server\simple.exe 10"> Link </A> in
a HTML e-mail, no luck. It says it could not find the file or starts
it without passing in any arguments.

I have been looking all over for help (I have tried simple.exe?10 as
well), but not nothing has worked so far. Any help would be much
appreciated.

How do you try to detect the arguments inside the application?
Also a better newsgroup to consult is microsoft.public.dotnet.languages.vc newsgroup.

Also better use the public MS news server for that one:

msnews.microsoft.com

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #3
Thank you both for the information. As for the arugments, I am just
using main(int argc, char *argv[]). It will work if I just run it from
the start menu.

Jul 23 '05 #4
si*******@gmail.com wrote:
Thank you both for the information. As for the arugments, I am just
using main(int argc, char *argv[]). It will work if I just run it from
the start menu.


As far as I know it is not allowed to use spaces inside a link. Have you tried the following?

<A HREF="\\server\simple.exe%2010"> Link </A>
--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #5
I hadn't thought of that. It looks as though it took it literally
rather than interpretting it....

Jul 23 '05 #6
si*******@gmail.com wrote:
I hadn't thought of that. It looks as though it took it literally
rather than interpretting it....

After some experiments I think one way you can do it, is by entering the arguments you
want from inside the program rather than the command line. For example:
#include <iostream>
#include <vector>
#include <cstdlib>
int main()
{
using namespace std;

string arg;

cout<<"\nGive input argument: ";

getline(cin, arg);

// Process arg...

system("pause");
}

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #7
Ioannis Vranos wrote:
#include <iostream> #include <string> #include <cstdlib>
int main()
{
using namespace std;

string arg;

cout<<"\nGive input argument: ";

getline(cin, arg);

// Process arg...

system("pause");
}

--
Ioannis Vranos

http://www23.brinkster.com/noicys
Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Marcin | last post by:
Hello all! A few years ago I created a form with button which let me send an email with an attachment. It was created in Access 97. Now I would like to move this application into Access 2003....
4
by: John Sutor | last post by:
I currently have an event handler setup to handle keypress events. the handler only takes the same arguments as the keypress event (object sender, System.Windows.Forms.KeyPressEventArgs e). I...
1
by: Nick Gilbert | last post by:
Hi, I'm trying to create a system whereby my desktop application submits it's order to an online server using a webservice (pretty standard!). So, I added a new project to my solution to...
0
by: Derek M | last post by:
I am sending data to a web service thru asp.net vb Connection to web service is good and the header data goes over but the subdata which is an arra is not going. I can not set the instance...
2
by: javier.gomez | last post by:
is it possible to send values to a VB.Net exe? For example can I run an exe sending the value of 5 and having the application show a message box with a number 5?
2
by: suekinch | last post by:
What is the code to send mail/feedback back to the administrator of a site. The code I am using is coming up with an error saying SmtpMail 3 arguments. I also have issues transferring a...
4
by: shivamverma | last post by:
Hi, Everyone I m working on a complaint management site and one of the requirement is sending a email to the administrator. I changed the php.ini file now it looks like SMTP = my outgoing...
1
by: Rich | last post by:
Hello, I am working on a python library for sending and receiving data from a Subaru's ECU (the fuel injection computer) via the OBD-II port and an OBD to USB cable, with the Subaru Select Monitor...
2
by: lstanikmas | last post by:
Hi, I'm validating a form with this ASP but receiving some blank email responses; does anyone see anything wrong with it?: function isFormVarExcluded(thisForm, strToCheck) { var strExcludeVars...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.