00001 00002 00003 // 00004 // SECTION.H (c) YoY'99 WEB: www.aestesis.org 00005 // 00008 #ifndef _SECTION_H_ 00009 #define _SECTION_H_ 00012 #include <windows.h> 00013 #include "object.h" 00014 #include "bitmap.h" 00017 00018 // If you use directly the variables in the class API, it's at your own risks. Prefer the methods... 00019 00022 00023 class Asection 00024 { 00025 public: 00026 CRITICAL_SECTION cs; 00027 00028 ADLL Asection (); 00029 ADLL virtual ~Asection (); 00030 00031 ADLL virtual bool enter (); // return TRUE if OK (wait if not OK, but return FALSE at the end of the section) 00032 ADLL virtual void leave (); 00033 }; 00034 00037 #endif //_SECTION_H_