By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,122 Members | 2,029 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,122 IT Pros & Developers. It's quick & easy.

Closing via Console generates non-zero exit code

P: n/a
I have a C++ Console application being written using VS C++.NET 2005
Express. It never crashes and seems to be working just fine.

However, when I close the application via the Console 'X' exit button in
upper right corner of its dialog box I get the following exit code:

"The program '[1576] MyApplication.exe: Managed' has exited with
code -1073741510 (0xc000013a)."

If I close it via the 'X' in the application form it exits with exit code 0:

"The program '[872] Thonks.exe: Managed' has exited with code 0 (0x0)."

To repeat, nothing goes wrong ever. But the return of an non-zero exit code
usually means something isn't quite right.

As an added bit of info that could easily be part of this oddity, when the
'X' in the application form is clicked I capture the interrupt and fade out
the form. Thus, when using this method of closing the form exists for a
while after the exit button has been hit. This is not the case when exiting
via the Console, this exits immediately. Thus, Im thinking the timer I use
to close the form may be complaining (although not sure how a close via
Console goes thorough the exit procedure)...

Should I be worried about anything? : )

[==P==]
Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Peter Oliphant" <po*******@RoundTripInc.com> wrote in message
news:O2*************@TK2MSFTNGP15.phx.gbl...
I have a C++ Console application being written using VS C++.NET 2005
Express. It never crashes and seems to be working just fine.
Cool.
However, when I close the application via the Console 'X' exit button in
upper right corner of its dialog box I get the following exit code:

"The program '[1576] MyApplication.exe: Managed' has exited with
code -1073741510 (0xc000013a)."


Take a look at <winnt.h> or <ntstatus.h>. That is the value assigned to the
manifest constant STATUS_CONTROL_C_EXIT. I think that the runtime is just
choosing to end your program with the code to note the user's cancel
operation.

Regards,
Will
Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.