release parent console (cmd.exe)

  • Thread starter Thread starter Sergey Kirichenko
  • Start date Start date
S

Sergey Kirichenko

Hi,

I create console appl with compiller's CONSOLE derective.
When my appl started on Windows98 from parent console (command.com) I can
use FreeConsole function for release parent console BEFORE close my appl. My
appl continue running but command.com's windows ready to input - it good for
me.
But on Windows XP I can NOT release parent console (cmd.exe)! I use the
function FreeConsole but cmd's windows still waiting for my appl will close.
How to release parent console on Windows2000 BEFORE close application?
Thanx.
 
You can't. Are you simply trying to do something similar to being a unix
daemon? Either write your application as a service or create the process
detached from the console, either with cmd.exe's 'start' command or as an
option to CreateProcess ().
 
You can't.
Why Windows9x make it possible? But NT - no?
MSDN say: "The FreeConsole function detaches the calling process from its
console."
Under W98 FreeConsole detaches, make parent console ready for input. But
NT's parent console still waiting!

~~~~~~~~~~~~~~~~~~~~~~~
Sergey
 
But cmd.exe is still wating for your process to exit.

Maybe you could trick it into not waiting for you by creating a message
queue. I don't know if that will work, but it's a guess.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top