473,657 Members | 2,845 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.e xe: 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 2506
"Peter Oliphant" <po*******@Roun dTripInc.com> wrote in message
news:O2******** *****@TK2MSFTNG P15.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.e xe: 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
9276
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 python wrapper module for sockets, and found that the close command doesn't actually call the underlying close! this didn't seem right, so i added it, and my code now works simply and as expected. def close(self):
1
3787
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 after i send data into it? I simply want to open socket, send data, close socket and have the server just handle one client thread to recieve connection, recieve data, and close socket
7
4520
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 Dev C++ Console Window from closing // before I can see the program's output void keepConsoleWindowOpen ()
3
7160
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 am extracting these files once a day beginning at midnight). Since one or more consumer has a particular extract file open, I need to detect this and then take action to close all open file connections so I can put the new extract file out onto...
3
1348
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 von Cossel I of Germany
2
3177
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 console application named "etm.exe", I would like to call it in my .net (VC) application. What I want to do is when the user type some command in my .net application, I redirect this command
6
1669
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 just the form is closing or the application is closing. Do you know how to tell?
6
10424
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 GUI without the black console on background.. Now I check if there are some parameters and if there aren't parameters I run the GUI (with the black console that remain..). If I choose Windows application on Visual Studio, when I run the...
0
936
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 ~ 2) move to ~/something 3) close lfm 4) be in ~/something on the console
4
7703
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
0
8384
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8820
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7314
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5630
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.