473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Closing via Console generates non-zero exit code

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
1 2481
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: simon place | last post by:
Spent some very frustrating hours recoding to find a way of closing a server socket, i'd not thought it would be any problem, however, after complete failure and as a last resort, i looked at the...
1
by: Daniel | last post by:
after opening socket, sending data then closing socket 3000 times i get "Only one usage of each socket address" what am i doing wrong? is there some thing else i need to do to free up the socket...
7
by: Miktor | last post by:
At the minute I am using the following rather unwieldy function to prevent the console window in Dev C++ from closing before I can see the output from my program: // function to prevent the...
3
by: blakecaraway | last post by:
Hi there. I have a C# console application that extracts data to flat files. Some of my business partners begin consuming these extract files before I've had a chance to write the newest ones (I...
3
by: Alvo von Cossel I | last post by:
hi, i have a working console app. however, it closes as soon as it opens. i know that it works because i can just about read it. how do i stop it from closing straight after opening? -- Alvo...
2
by: Ivan Lam | last post by:
Hi all, Thanks for reading my post!!! I am facing a problem that I cannot redirect StandartOutput and StandardInput at the same time without closing the executive. Actually, I have a...
6
by: **Developer** | last post by:
I've been looking but can't find out how in a form Closing event to know if the closing is because the form's "X" had been clicked or the main form's "X" was clicked. That is, I need to know if...
6
by: Giojo | last post by:
Hello guys! I can't resolve this problem.. I want my programm in c# working with only console if there are some parameters, but if someone make double-click on the exe I want to start the graphic...
0
by: Fabian Braennstroem | last post by:
Hi, I am using lfm, a curses based file manager, and want to change into the last directory of my lfm-session after closing it. To be more clear: 1) run lfm from console in the home directory...
4
by: Academic | last post by:
I read the Help and some of the many Google hits I got but can't find out the difference between MyBase.Closing and MyBase.FormClosing Can anyone tell me? Thanks
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.