It is currently Fri Jun 23, 2017 5:20 pm

All times are UTC - 5 hours




 Page 1 of 1 [ 3 posts ] 
Author Message
 Post subject: Doesn't exit with 0 when exiting from console window
PostPosted: Fri May 01, 2015 7:21 am 

Joined: Fri Jul 04, 2014 1:07 pm
Posts: 6
When the program exits due to typing "quit", "exit", or "q" in the console window, the program quits, but the thread exit code is not 0, it is 13.

When the program exits due to closing the window normally, thread exits with code 0.

Is there something I'm missing?

-darkrider


Offline
 Profile  
 
 Post subject: Re: Doesn't exit with 0 when exiting from console window
PostPosted: Fri May 01, 2015 8:28 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1094
Location: Ontario Canada
13 sounds like it might be the ascii code for a carriage return. You would be sending that down through the WinProc if you type something and then press enter on the keyboard.


Offline
 Profile  
 
 Post subject: Re: Doesn't exit with 0 when exiting from console window
PostPosted: Fri May 01, 2015 12:24 pm 

Joined: Fri Jul 04, 2014 1:07 pm
Posts: 6
You know what, you're right! When I tried using ESC to set m_bQuit to true, it exited with a 27. That is also the ascii code for escape key.

Thanks! I'm glad I posted this or I'd still be trying to figure out how to get it to return all 0's.

-dakrider


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

cron