Autor | Thema: C++ Returnwerte abfragen | | Datum:21.05.02 14:48 
(rupert.ecker@univie.ac.at) | |
Hallo Leute,
Ich rufe mit WinExec ein C++ Programm auf. Dieses wird mit einem bestimmten Exit-Wert beendet. Wie kann ich diesen Wert in Profan (7.5) abfragen?? WinExec liefert ja nur den Handle...??
Danke und viele Grüße
Rupert
|
| | Datum:21.05.02 15:47 
(schmidts@flat2serv.de) | |
Hallo,
das ist nicht nur auf C++ beschränkt, ist eine Windows Funktion ;) Du benötigst die API "GetExitCodeProcess" (Kernel32.dll). Da Du das Handle hast, ist es recht einfach. Hier der Auszug aus der API:
"
The GetExitCodeProcess function retrieves the termination status of the specified process.
BOOL GetExitCodeProcess(
HANDLE hProcess, // handle to the process
LPDWORD lpExitCode // address to receive termination status
);
Parameters
- hProcess
Identifies the process.
Windows NT: The handle must have PROCESS_QUERY_INFORMATION access. For more information, see Process Objects.
- lpExitCode
Points to a 32-bit variable to receive the process termination status.
Return Values
If the function succeeds, the return value is nonzero.
"
Mfg.
Sven Schmidts
|
| | Datum: 22.05.02 13:34 
(ps@burghardt-ib.de) | |
Hallo,
dazu mal ne kurze Frage: ist auch mit Profan irgendwie möglich so einen Rückgabewert beim Beenden zu erzeugen ??
|
|
|