Thanks for replying, Chris... I guess I was not really clear. I tried to
change the Sub Main signature in my VB .NET smart device application, but
couldn't... It seems it is not possible to pass command line parameters to an
application written in VB .NET... Then I Googled it, and it seems one really
can't pass them. Instead, I thougth I could add a new project to my solution,
this time in C++ as it accepts parameters, make it the startup project, pass
parameters to it and forward these parameter to my VB project within the same
solution... Now, if this is the possible solution, and considering I don't
know a thing about Visual C++, what should I do to make it call my other
project in VB .NET ? Thanks again !
"<ctacke/>" wrote:
> Where did you get the info that you can't get parameters? Main gets an
> array of strings as the command line parameters - you simply need to define
> it as such. If you mean second instances, then C++ has a similar problem -
> you have to get the command-line from the second instance from the second
> instance to the first. IPC with a P2P message queue works well for that.
>
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Giving back to the embedded community
> http://community.OpenNETCF.com
>
>
>
> "Junior" <(E-Mail Removed)> wrote in message
> news:6CE09EE8-9455-4A6A-95F4-(E-Mail Removed)...
> > Hello !
> >
> > I have this windows forms device application in VB .NET, and need to pass
> > a
> > command line parameter to it, since it is going to be called by another
> > application under some circunstances. I've learned that it is not
> > possible,
> > and one solution is to create a new C++ console application which would
> > receive the command line parameter and call my application passing the
> > parameter along, replacing the original Main Sub. It doesn't look elegant,
> > but solves the problem. Now, is this the way to go ? If so, and
> > considering I
> > know nothing about C++, what would the C++ source code look like ? I
> > included
> > the wizard code generated in C++. I imagine this would create a single
> > executable which receives the parameter and executes my existing
> > application
> > -another project in the same solution.
> >
> > Thanks very much, Junior.
> >
> > // StartUpWithParmsInC.cpp : Defines the entry point for the console
> > application.
> > //
> > #include "stdafx.h"
> > #include <windows.h>
> > #include <commctrl.h>
> > int _tmain(int argc, _TCHAR* argv[])
> > {
> > return 0;
> > }
> >
>
>
>