Win32 (Windows NT and Windows 95) Event Class Implementation
class Event {
private:
HANDLE event;
public:
Event(void) {
event = CreateEvent((void*)0, TRUE, FALSE, (void)0);
}
~Event(void) {
CloseHandle(event);
}
void Signal(void) {
PulseEvent(event);
}
void Wait(void) {
WaitForSingleObject(event, INFINITE);
}
};