Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Starting exe from another exe
Message
 
To
10/06/2008 18:50:44
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01322835
Message ID:
01323036
Views:
20
We are not talking about code, we are talking about an EXE. Exe's do not accept anything but strings as parameters. In code, you can accept ANYTHING as a parameter.

I could be mistaken, but in all my time programming and using applications, once a program is compiled, there is no way (that I know of) to send starting parameters to said app, if not in a string format. The developer then needs to parse out the string, to create the array if he/she needs multiple parameters. Hence why you see many apps use a "/" as a delimiter between parameters.

>>No exe accepts "arrays" as parameters directly, an exe can only accept a string of parameters.
>
>Um, well, that's not quite accurate. In order to send more than one parameter to an application, you define the Main like this:
>
>
>[STAThread]
>static void Main(string[] args)
>{
>	if (args.Length > 1)
>		// do stuff with your parms
>
>	Application.Run(new Form1());
>}
>
>
>Sure looks like an array to me. <g>
>
>Maybe VB is different? I dunno ...
>
>~~Bonnie
>
>
>
>
>>No exe accepts "arrays" as parameters directly, an exe can only accept a string of parameters. How the exe handles those parameters is up the the developer of the exe. Look at the command you are using, intellisense shows you that it needs a string value. All you need to do is suppy the data in the proper object (in this case a string) for the command and you'll be fine.
>>
>>>Hi Ben
>>>
>>>Thanks for that, but that’s what I am getting confused about, doesn’t the main program that I am calling expect and array?
>>>Tia
>>>Stuart
________________________
Ben Santiago, MCP & A+
Programmer Analyst (SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS)
Eastern Suffolk BOCES - Student Data Services


Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
-Rich Cook
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform