Anwendung starten
-
Hi,
ich möchte aus einem Dialog durch Drücken eines Buttons eine Windows-Anwendung
starten (GNU-PLOT).
Wie kriege ich das bewerkstelligt?
--> also Aufruf ohne Parameter iss derzeit mein Problem.
Vielen Dank
Uwe
-
Hi,
versuch mal ShellExecute()
-
strCommand = _T("C:\\Testprogramm\\test.exe");
int iCreate = CreateProcess ( NULL,
(char*)(LPCTSTR)strCommand,
NULL, NULL, NULL,
CREATE_NEW_CONSOLE,
NULL, NULL,
&aStartupInfo,
&aProcessInfo );
if ( iCreate == 0 )
{
return _T("");
}// Wait until child process exits.
WaitForSingleObject( aProcessInfo.hProcess, INFINITE );// Close process and thread handles.
CloseHandle( aProcessInfo.hProcess );
CloseHandle( aProcessInfo.hThread );