Access to CommandLine Arguments ?

R

roland

I have a program that can run in two modes:
- started by the user
- started at a event (after activesync)
The program behaves differenty in the two modes, so it is important to know
who or what started the program.
I know that when it is started by the event (set by a call to CERunAppAt )
the commandline holds an argument specifying what event triggered the
start-up. So if I could read the commandline arguments, everything would be
settled. In the framework this is done by Environment.Commandline, but this
is not implemented in the CF. Hence my question: is there any other way (an
API?) to get at the commandline arguments?
Thanks in advance,
Roland
 
C

Chris Tacke, eMVP

Simply change the signature of your Main() function to accept a command
line. In C# it looks like this:

static void Main(string[] args)
 
R

roland

Thanks, Chris
I am relying so much on this framework, that I forgot the obvious...
Roland

Chris Tacke said:
Simply change the signature of your Main() function to accept a command
line. In C# it looks like this:

static void Main(string[] args)

--
Chris Tacke, eMVP
Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net

roland said:
I have a program that can run in two modes:
- started by the user
- started at a event (after activesync)
The program behaves differenty in the two modes, so it is important to know
who or what started the program.
I know that when it is started by the event (set by a call to CERunAppAt )
the commandline holds an argument specifying what event triggered the
start-up. So if I could read the commandline arguments, everything would be
settled. In the framework this is done by Environment.Commandline, but this
is not implemented in the CF. Hence my question: is there any other way (an
API?) to get at the commandline arguments?
Thanks in advance,
Roland
 

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