Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.2 KiB

  1. #include "precomp.h"
  2. #include "Conf.h"
  3. #include "confpolicies.h"
  4. #include "AtlExeModule.h"
  5. #include "NmManager.h"
  6. #include "NmApp.h"
  7. // This is slightly modified from the code that AtlAppWizard generates for local servers
  8. CExeModule::CExeModule()
  9. : m_dwThreadID( 0 ),
  10. m_hResourceModule( NULL ),
  11. m_bInitControl(FALSE),
  12. m_bVisible(FALSE),
  13. m_bDisableH323(FALSE),
  14. m_bDisableInitialILSLogon(FALSE)
  15. {
  16. DBGENTRY(CExeModule::CExeModule);
  17. DBGEXIT(CExeModule::CExeModule);
  18. }
  19. LONG CExeModule::Unlock()
  20. {
  21. DBGENTRY(CExeModule::Unlock);
  22. LONG l = CComModule::Unlock();
  23. if (l == 0)
  24. {
  25. if (ConfPolicies::RunWhenWindowsStarts())
  26. {
  27. // we may want to make sure that there is no conference
  28. // if there is,we should probably bring up the UI
  29. }
  30. else
  31. {
  32. if( !IsUIVisible() )
  33. {
  34. CmdShutdown();
  35. }
  36. }
  37. }
  38. DBGEXIT_INT(CExeModule::Unlock,l);
  39. return l;
  40. }
  41. BOOL CExeModule::IsUIActive()
  42. {
  43. return !InitControlMode() &&
  44. (0 == CNmManagerObj::GetManagerCount(NM_INIT_OBJECT)) &&
  45. (IsUIVisible() ||
  46. (0 == CNmManagerObj::GetManagerCount(NM_INIT_BACKGROUND)) &&
  47. (0 == CNetMeetingObj::GetObjectCount()));
  48. }
  49. // Declare the _Module
  50. CExeModule _Module;