You should try using the c++ program like this:
int main ( int argc, char *argv[] )
{
if (argc != 1){
throw std::exception("Bad command line.");
}
}
And then use argv[0] to access it's first parameter.
For example:
In C++:
int main ( int argc, char *argv[] )
{
if (argc != 1){
throw std::exception("Bad command line.");
}else{
std::cout << "Param 1: " << argv[0] << std::endl;
}
}
In C#:
System.Diagnostics.Process.Start("pathofapp.exe", "this");
Output:
Param 1: this