Changeset 1305
- Timestamp:
- 11/13/2009 9:34:10 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/eraser5/EraserDll/Common.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser5/EraserDll/Common.h
r1110 r1305 58 58 GLOBALVAR E_UINT16 uReferenceCount GLOBALINIT1(0); 59 59 GLOBALVAR CEvent evLibraryInitialized GLOBALINIT2(FALSE, TRUE); 60 const LPTSTR strEraserMutex = _T("Eraser-D309F296-B70C-473d-B2DE-2A1F9C7C9FB1"); 60 61 61 62 // helpers … … 67 68 csReferenceCount.Lock(); \ 68 69 uReferenceCount++; \ 70 if (uReferenceCount == 1) \ 71 { \ 72 SECURITY_DESCRIPTOR sc; \ 73 InitializeSecurityDescriptor(&sc, SECURITY_DESCRIPTOR_REVISION); \ 74 SetSecurityDescriptorDacl(&sc, TRUE, NULL, FALSE); \ 75 \ 76 SECURITY_ATTRIBUTES attr; \ 77 attr.nLength = sizeof(attr); \ 78 attr.lpSecurityDescriptor = ≻ \ 79 attr.bInheritHandle = FALSE; \ 80 \ 81 CreateMutex(&attr, TRUE, strEraserMutex); \ 82 CreateMutex(&attr, TRUE, CString(_T("Global\\")) + strEraserMutex); \ 83 } \ 69 84 csReferenceCount.Unlock() 70 85 … … 75 90 } \ 76 91 if (uReferenceCount == 0) { \ 92 CMutex localMutex(FALSE, _T("Eraser-D309F296-B70C-473d-B2DE-2A1F9C7C9FB1")); \ 93 CMutex globalMutex(FALSE, _T("Global\\Eraser-D309F296-B70C-473d-B2DE-2A1F9C7C9FB1")); \ 94 localMutex.Unlock(); \ 95 globalMutex.Unlock(); \ 77 96 evLibraryInitialized.ResetEvent(); \ 78 97 } \
Note: See TracChangeset
for help on using the changeset viewer.
