00001 #ifndef _SEMAPHORE_H_ 00002 #define _SEMAPHORE_H_ 00003 00004 #ifdef WIN32 00005 #include <afxmt.h> 00006 #endif 00007 00008 class Semaphore 00009 { 00010 public: 00011 Semaphore( const char* name ); 00012 Semaphore( const int guid ); 00013 ~Semaphore(); 00014 00015 void Lock(); 00016 void Unlock(); 00017 00018 protected: 00019 char* name; 00020 00021 #ifdef WIN32 00022 CSemaphore* semaphore; 00023 CSingleLock* singleLock; 00024 #endif 00025 }; 00026 00027 #endif