// Common, group WinWrap
// see CW Class Library
// Copyright Alexander Liss
#ifndef __KERNEL_H__
#define __KERNEL_H__
#include "waitable.h"
class Kernel: public WaitableObject
{
Kernel(Kernel&);
Kernel& operator=(const Kernel&);
public:
virtual ~Kernel() = 0;
DWORD get_status()const{return status;}
HANDLE get_handle()const{return handle;}
#if( _WIN32_WINNT>=0x0400 )
BOOL get_info(DWORD& flags);
BOOL set_info(DWORD mask,DWORD flags);
#endif
protected:
HANDLE handle;
DWORD status;
Kernel():handle(0),status(ERROR_INVALID_HANDLE){}
};
inline bool is_valid_handle(HANDLE handle)
{
return handle != 0 && handle != INVALID_HANDLE_VALUE;
}
#endif