void CXenIfaceCreator::Stop()
{
+ // Check if registry key is present, implies Windows Update
+ // require a reboot, which may spend time installing updates
+ LogIfRebootPending();
+
m_devlist.Stop();
}
return true;
}
+void CXenIfaceCreator::LogIfRebootPending()
+{
+ HKEY Key;
+ LONG lResult;
+
+ lResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE,
+ "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsUpdate\\Auto Update\\RebootRequired",
+ 0,
+ KEY_READ,
+ &Key);
+ if (lResult != ERROR_SUCCESS)
+ return; // key doesnt exist, dont log anything
+
+ RegCloseKey(Key);
+
+ CXenAgent::Log("RebootRequired detected\n");
+}
+
void CXenIfaceCreator::StartShutdownWatch()
{
if (m_ctxt_shutdown)
HANDLE m_evt_slate_mode;
private:
+ void LogIfRebootPending();
void StartShutdownWatch();
void StopShutdownWatch();
void StartSlateModeWatch();