Named global lock which can be used over process boundaries. More...
#include <GCSynch.h>
Public Member Functions | |
CGlobalLock (const char *pszName) | |
Creates a global lock object name pszName. In case an object with the same name already exists a reference to the existing object will be created. If pszName is NULL an unnamed object will be created. More... | |
CGlobalLock (const GENICAM_NAMESPACE::gcstring &strName) | |
Creates a global lock object name strName. In case an object with the same name already exists a reference to the existing object will be created. If strName is empty an unnamed object will be created. More... | |
bool | IsValid (void) const |
tests whether the lock is valid More... | |
bool | Lock (unsigned int timeout_ms) |
enters the lock (may block) More... | |
bool | TryLock (void) |
tries to enter the lock and returns immediately when not possible More... | |
void | Unlock (void) |
leaves the lock More... | |
~CGlobalLock () | |
Protected Attributes | |
long | m_DebugCount |
Private Member Functions | |
CGlobalLock (const CGlobalLock &) | |
CGlobalLock & | operator= (const CGlobalLock &) |
Named global lock which can be used over process boundaries.
|
explicit |
Creates a global lock object name pszName. In case an object with the same name already exists a reference to the existing object will be created. If pszName is NULL an unnamed object will be created.
|
explicit |
Creates a global lock object name strName. In case an object with the same name already exists a reference to the existing object will be created. If strName is empty an unnamed object will be created.
GENICAM_NAMESPACE::CGlobalLock::~CGlobalLock | ( | ) |
|
private |
bool GENICAM_NAMESPACE::CGlobalLock::IsValid | ( | void | ) | const |
tests whether the lock is valid
bool GENICAM_NAMESPACE::CGlobalLock::Lock | ( | unsigned int | timeout_ms | ) |
enters the lock (may block)
|
private |
bool GENICAM_NAMESPACE::CGlobalLock::TryLock | ( | void | ) |
tries to enter the lock and returns immediately when not possible
void GENICAM_NAMESPACE::CGlobalLock::Unlock | ( | void | ) |
leaves the lock
|
mutableprotected |