tags:

views:

40

answers:

2

Hi! Is it possible to launch a C#.Net (2.0) application from an application written in C++???

Thanks,

EDIT: Cool - so I just have to know where the app is:

LPTSTR szCmdline = _tcsdup(TEXT("C:\\Program Files\\MyApp -L -S"));
CreateProcess(NULL, szCmdline, /* ... */);
+1  A: 

Yes - for example using system function or CreateProcess \ CreateProcessW \ CreateProcessA [or fork+ exexif you use *nix + mono]

Maciej Piechotka
Do you know if this is a blocking function - will my app hang?
Paligulus
+2  A: 

You can launch any EXE using CreatePocess or ShellExecute API. ( including C#.Net)

aJ
So the fact that it is a .Net app is irrelevant?
Paligulus
Yes, These APIs allow you to launch any EXEs
aJ
@aJ Good stuff - thanks
Paligulus