G
Guest
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;
}
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;
}