Changeset 60765 in vbox for trunk/src/VBox/Main/src-server/win
- Timestamp:
- Apr 29, 2016 2:26:58 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/win/svcmain.cpp
r59369 r60765 6 6 7 7 /* 8 * Copyright (C) 2004-201 3Oracle Corporation8 * Copyright (C) 2004-2016 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 #include <stdio.h> 21 21 #include <stdlib.h> 22 #include <tchar.h> 22 23 23 24 #include "VBox/com/defs.h" … … 41 42 #include <iprt/message.h> 42 43 43 #include <atlbase.h> 44 #include <atlcom.h> 45 46 #define _ATL_FREE_THREADED 47 48 class CExeModule : public CComModule 44 class CExeModule : public ATL::CComModule 49 45 { 50 46 public: … … 70 66 LONG CExeModule::Unlock() 71 67 { 72 LONG l = CComModule::Unlock();68 LONG l = ATL::CComModule::Unlock(); 73 69 if (l == 0) 74 70 { … … 92 88 } while (dwWait == WAIT_OBJECT_0); 93 89 /* timed out */ 94 if (!bActivity && m_nLockCnt== 0) /* if no activity let's really bail */90 if (!bActivity && GetLockCount() == 0) /* if no activity let's really bail */ 95 91 { 96 92 /* Disable log rotation at this point, worst case a log file … … 114 110 } 115 111 } 116 #if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED)112 #if _WIN32_WINNT >= 0x0400 117 113 CoSuspendClassObjects(); 118 if (!bActivity && m_nLockCnt== 0)114 if (!bActivity && GetLockCount() == 0) 119 115 #endif 120 116 break; … … 135 131 } 136 132 137 CExeModule _Module;133 static CExeModule _Module; 138 134 139 135 BEGIN_OBJECT_MAP(ObjectMap) … … 384 380 { 385 381 _Module.StartMonitor(); 386 #if _WIN32_WINNT >= 0x0400 & defined(_ATL_FREE_THREADED)382 #if _WIN32_WINNT >= 0x0400 387 383 hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE | REGCLS_SUSPENDED); 388 384 _ASSERTE(SUCCEEDED(hRes));
Note:
See TracChangeset
for help on using the changeset viewer.