You could try asking this quesiton in the Visual C++ General Forum at the following address
http://social.msdn.microsoft.com/Forums/en-us/vcgeneral/threads
Anyway, I don't think that you can take control of the OS shutdown process and delaying it: once the timeout that Windows allows the applications to use to end their jobs expires, every process is forced to terminate and the shutdown sequence cannot be paused
or halted by a process.
Bye.
Luigi Bruno - Microsoft Community Contributor 2011 Award