Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Starting exe from another exe
Message
From
11/06/2008 10:44:56
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01322835
Message ID:
01323095
Views:
21
>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 think we are just talking about semantics. <g> See my reply to Stuart.

~~Bonnie



>
>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
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform