Hi all,

Perhaps there is someone who has knowledge about how the following is done. I want to terminate my program with an exit code I chose.

This is needed for my program because my program is called by another which should exit itself when a specific exit code is returned by my app.

I thought it would be possible by using the ExitProcess Api call. But it crashes the program with an illegal operation. (Though this happens at the end of Sub Main)

What should i do in my application to sucessfully return my own specified exit code ?

Greetings,

Dunebuggy