Command Line Arguments w/Running Program

G

Guest

Does anyone know how to get command line arguments from a .NET CF App when
the command line is called after the program is running? Is this possible?

Thanks.
 
I

Ilya Tumanov [MS]

public static void Main( string[] args)

args array contains are command line arguments.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
C

Chris Tacke, eMVP

Unfortunately this won't work on PPC, as the second instance is never
launched and the CF itself eats the call - leaving your command line in
nowhere land (I'm tempted to say it's sent to /dev/null). It's a limiation
of the PPC, and a really poor architecture choice on the part of MS (IMHO).
In CF 1.0 you could rename the AGL_PARK window so you could get the second
instance, then handle the command line, but CF 2.0 broke that. The
workaround is to write a native "launcher" shim that takes the command-line
params and shoots them to a thread in the native app over something like a
MsgQueue or MessageWindow. Ugly.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


Ilya Tumanov said:
public static void Main( string[] args)

args array contains are command line arguments.

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no
rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).

rmlexi said:
Does anyone know how to get command line arguments from a .NET CF App
when
the command line is called after the program is running? Is this
possible?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top