#include #include void main() { STARTUPINFO si; PROCESS_INFORMATION pi; memset( &si, 0, sizeof( si ) ); si.cb = sizeof(si); if ( ! CreateProcess( NULL, "..\\..\\print\\Debug\\print.exe 5 100", NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi) ) fprintf( stderr, "CreateProcess failed with %d\n", GetLastError() ); WaitForSingleObject( pi.hProcess, INFINITE ); CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); }