STARTUPINFO si = {0};
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
si.wShowWindow = FALSE;
si.dwFlags = STARTF_USESHOWWINDOW;
// Start the child process.
if( !CreateProcess( NULL,chrPathtoExeFile,NULL,NULL,TRUE,CREATE_NO_WINDOW,NULL,NULL,&si,&pi ))
{
//printf( "win32::CreateProcess Error::: (%d).\n", GetLastError() );
return;
}
// Close process and thread handles.
//CloseHandle( pi.hProcess );
//CloseHandle( pi.hThread );
This line is the problem:
CreateProcess( NULL,chrPathtoExeFile,NULL,NULL,TRUE,CREATE_NO_WINDOW,NULL,NULL,&si,&pi )
why does it create the window when i launch a certain app? i want the windows of that app to be invisible