I am running exe with 2 parameters in an MFC application. how can i achieve this.
Eg: sox.exe a.wav b.mp3 I need to execute within an MFC application
Thanks in advance.
I am running exe with 2 parameters in an MFC application. how can i achieve this.
Eg: sox.exe a.wav b.mp3 I need to execute within an MFC application
Thanks in advance.
If a MFC application supports stdlib.h
, you might be able to use the system()
function: create a C string with the command you want to run, i.e. "sox.exe a.wav b.mp3"
and use it as parameter for the system()
function, like this:
system("sox.exe a.wav b.mp3");
Convert a set of files named track01.wav
, track02.wav
, ... , track99.wav
into song01.mp3
, song02.mp3
, ...
char command[100];
int i;
for (i=1;i<=99;i++)
{
sprintf (command, "sox.exe track%.2d.wav song%.2d.mp3", i, i);
system (command);
}
The preferred way of doing this is using ShellExecuteEx.