Nevermind, I found the 'SetProcessShutdownParameters' function and it fixed the problem for me
On Tue, Apr 9, 2013 at 2:00 PM, Thiago Padilha <[email protected]> wrote: > Hi > > I've written a very small gui application(system tray icon) that runs > a headless virtualbox when I logon to windows(It is a command line app > so I just place a shortcut on start menu) > > The only problem is that I can't make it cleanly exit the vm when I > reboot/shutdown/logoff my laptop. I can listen for windows > WM_ENDSESSION > message(https://github.com/tarruda/VBoxTrayIcon/blob/master/api.cpp#L156-L163), > but when my cleanup > routine(https://github.com/tarruda/VBoxTrayIcon/blob/master/api.cpp#L156-L163) > is executed the virtual machine is already aborted. I've tested this > by showing a messagebox before the cleanup code, which gave me time to > cancel the logoff and verify that the machine was aborted. > > It seems that whatever process manages the background vm is being > killed by windows before I have a chance to send the save command. > > How can I fix this issue? Please don't be afraid to look at the code, > the two files combined have like 400 lines of code. > > Thanks in advance. _______________________________________________ vbox-dev mailing list [email protected] https://www.virtualbox.org/mailman/listinfo/vbox-dev
