<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Thanks for the info.</DIV>
<DIV> </DIV>
<DIV>It's the Frontend GUI layer, seems the guest additions state change is the way to go?<BR><BR>--- On <B>Thu, 7/22/10, Knut St. Osmundsen <I><knut.osmundsen@oracle.com></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: Knut St. Osmundsen <knut.osmundsen@oracle.com><BR>Subject: Re: [vbox-dev] good way of detecting guest vm reboot?<BR>To: vbox-dev@virtualbox.org<BR>Date: Thursday, July 22, 2010, 3:29 PM<BR><BR>
<DIV class=plainMail>Huihong Luo wrote:<BR>> need to do some cleanup after a guest reboot, e.g., to close all taskbar<BR>> buttons and system tray icons from that vm.<BR>>  <BR>> One way is to detect the additions state from the vm, any other better<BR>> way to detect a reboot?<BR><BR>Depends on where in the code you are.  If you program the main API, the<BR>additions state change event is the best way to detect it I think.  On a<BR>deeper level there are several ways to get a callback when the VM is<BR>reset.  PDM Device & Drivers have pfnReset callback which gets worked<BR>when the VM is reset or reboot.  On the VM level there one can register<BR>a callback via VMR3AtStateRegister that gets called on every state<BR>change and it would then be possible to take action when leaving any of<BR>the VMSTATE_RESETTING* states.<BR><BR>Hope this was of some help.<BR><BR><BR>-- <BR><BR>Kind regards / Mit freundlichen
 Gruessen / Vennlig hilsen,<BR>  bird<BR><BR>--<BR><BR>ORACLE Deutschland B.V. & Co. KG  Knut St. Osmundsen<BR>Werkstrasse 24                    Senior Staff Engineer, VirtualBox<BR>71384 Weinstadt, Germany          mailto:<A href="http://us.mc343.mail.yahoo.com/mc/compose?to=bird@sun.com" ymailto="mailto:bird@sun.com">bird@sun.com</A><BR><BR>Hauptverwaltung: Riesstr. 25, D-80992 Muenchen<BR>Registergericht: Amtsgericht Muenchen, HRA 95603<BR><BR>Komplementaerin: ORACLE Deutschland Verwaltung B.V.<BR>Rijnzathe 6, 3454PV De Meern, Niederlande<BR>Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697<BR>Geschaeftsfuehrer: J. Kunz, M. van de Molen, A. van der Ven<BR><BR><BR>_______________________________________________<BR>vbox-dev mailing list<BR><A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org"
 ymailto="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</A><BR><A href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target=_blank>http://vbox.innotek.de/mailman/listinfo/vbox-dev</A><BR></DIV></BLOCKQUOTE></td></tr></table>