Huihong Luo wrote: > need to do some cleanup after a guest reboot, e.g., to close all taskbar > buttons and system tray icons from that vm. > > One way is to detect the additions state from the vm, any other better > way to detect a reboot?
Depends on where in the code you are. If you program the main API, the additions state change event is the best way to detect it I think. On a deeper level there are several ways to get a callback when the VM is reset. PDM Device & Drivers have pfnReset callback which gets worked when the VM is reset or reboot. On the VM level there one can register a callback via VMR3AtStateRegister that gets called on every state change and it would then be possible to take action when leaving any of the VMSTATE_RESETTING* states. Hope this was of some help. -- Kind regards / Mit freundlichen Gruessen / Vennlig hilsen, bird -- ORACLE Deutschland B.V. & Co. KG Knut St. Osmundsen Werkstrasse 24 Senior Staff Engineer, VirtualBox 71384 Weinstadt, Germany mailto:[email protected] Hauptverwaltung: Riesstr. 25, D-80992 Muenchen Registergericht: Amtsgericht Muenchen, HRA 95603 Komplementaerin: ORACLE Deutschland Verwaltung B.V. Rijnzathe 6, 3454PV De Meern, Niederlande Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697 Geschaeftsfuehrer: J. Kunz, M. van de Molen, A. van der Ven _______________________________________________ vbox-dev mailing list [email protected] http://vbox.innotek.de/mailman/listinfo/vbox-dev
