PC Review


Reply
Thread Tools Rate Thread

Closing via Console generates non-zero exit code

 
 
Peter Oliphant
Guest
Posts: n/a
 
      22nd Nov 2005
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==]


 
Reply With Quote
 
 
 
 
William DePalo [MVP VC++ ]
Guest
Posts: n/a
 
      23rd Nov 2005
"Peter Oliphant" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Console Application - Exit Code Mythran Microsoft VB .NET 4 15th May 2006 06:22 PM
VB code exit error when run via scheduler giving exit code of (c000008f). connoisseur.infotech@gmail.com Microsoft VB .NET 1 4th Aug 2005 02:31 PM
outlook 2003 generates error report on exit =?Utf-8?B?Zml0eg==?= Microsoft Outlook Discussion 5 26th Feb 2005 08:47 PM
Schedule Tasks did not run and generates exit code 80 david S Windows XP Basics 1 28th Sep 2003 07:29 PM
Closing Console Window from code. Peter R. Fletcher Microsoft Dot NET Framework 1 31st Jul 2003 02:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:49 AM.