Hi all...

I'm trying to run exe (Ping to be specific) with argument (www.yahoo.com) with the help of createprocess in button click event...
My prob is tht it's not running and how to redirect the output which usually comes in console window..I need to redirect it to the editBox...

Following is code snippet..



case IDOK:
{
char buff1[] = "ping.exe";
char buff2[] = "www.yahoo.com";
STARTUPINFO sif = {0};
PROCESS_INFORMATION pif = {0};
sif.hStdOutput = IDC_EDIT1;
CreateProcess(buff1,buff2,NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,&sif,&pif);
break;
}


Reply will be appreciated..
Thnks...