Index: /trunk/src/VBox/Main/src-server/win/HostPowerWin.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/win/HostPowerWin.cpp	(revision 46721)
+++ /trunk/src/VBox/Main/src-server/win/HostPowerWin.cpp	(revision 46722)
@@ -32,5 +32,5 @@
 static WCHAR gachWindowClassName[] = L"VBoxPowerNotifyClass";
 
-HostPowerServiceWin::HostPowerServiceWin(VirtualBox *aVirtualBox) : HostPowerService(aVirtualBox)
+HostPowerServiceWin::HostPowerServiceWin(VirtualBox *aVirtualBox) : HostPowerService(aVirtualBox), mThread(NIL_RTTHREAD)
 {
     mHwnd = 0;
@@ -56,4 +56,6 @@
         /* Send the quit message and wait for it be processed. */
         SendMessage(mHwnd, WM_QUIT, 0, 0);
+        RTThreadWait(mThread, 5000, NULL);
+        mThread = NIL_RTTHREAD;
     }
 }
