- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Is it possible to retrieve its exit code when calling an EXE file via SYSTEMQQ?
I have tried GETLASTERROR, GETLASTERRORQQ etc to no avail.
I realise this is given by the return value of the SYSTEM() call, but for completeness wanted to implement such checks for my use of SYSTEMQQ as well.
Or am I mis-understanding something basic about what SYSTEMQQ does?
thanks in advance,
dmitri
Is it possible to retrieve its exit code when calling an EXE file via SYSTEMQQ?
I have tried GETLASTERROR, GETLASTERRORQQ etc to no avail.
I realise this is given by the return value of the SYSTEM() call, but for completeness wanted to implement such checks for my use of SYSTEMQQ as well.
Or am I mis-understanding something basic about what SYSTEMQQ does?
thanks in advance,
dmitri
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SYSTEMQQ does not provide you a way to get the exit status. GETLASTERROR would not help here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Where exactly do you expect the .EXE to send its 'exit code'?
If it is indeed stand alone (not accessing one of your DLLs that is also accessed by your calling program, where otherwise the .EXE and your program could use a global flag held in the DLL for communication purposes), then the .EXE must write it to a file, which your program could then open and read.
You could turn your .EXE into a library function or routine called by a simple Thread function that you include in the library. You can then use CreatThread to send a value to the thread function that runs the .EXE's code and receive back from it a terminating value when the created thread exits.
If it is indeed stand alone (not accessing one of your DLLs that is also accessed by your calling program, where otherwise the .EXE and your program could use a global flag held in the DLL for communication purposes), then the .EXE must write it to a file, which your program could then open and read.
You could turn your .EXE into a library function or routine called by a simple Thread function that you include in the library. You can then use CreatThread to send a value to the thread function that runs the .EXE's code and receive back from it a terminating value when the created thread exits.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page