I have a standard EXE
I will be running it in command prompt.
I want my exe to return status to the shell. How can I make my standard exe to pass messages to shell.

My problem is if there was some problem so that the exe has to stop executing I have to return a message at the command prompt, with the error code returned to the shell.

How can I do that?

Thanks
Ramdas