![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cOSHandle.h>
Public Member Functions | |
cOSHandle (HANDLE h=INVALID_HANDLE_VALUE) noexcept | |
cOSHandle (const cOSHandle &Handle) noexcept | |
cOSHandle & | operator= (const cOSHandle &Handle) |
~cOSHandle () | |
operator HANDLE () const noexcept | |
HANDLE | get_Handle () const noexcept |
HANDLE & | ref_Handle () noexcept |
bool | isValidHandle () const noexcept |
void | CloseHandle () noexcept |
void | AttachHandle (HANDLE h) noexcept |
HANDLE | DetachHandle () noexcept |
HRESULT | WriteX (const void *pData, size_t nDataSize) const |
HRESULT | ReadX (void *pData, size_t nDataSize) const |
HRESULT | FlushX () const |
STREAM_SEEKRET_t | Seek (STREAM_OFFSET_t lOffset, SEEK_ORIGIN_TYPE eSeekOrigin) const |
HRESULT | WaitForSingleObject (TIMESYSD_t dwMilliseconds) const |
Static Public Member Functions | |
static bool | IsValidHandle (HANDLE h) noexcept |
static bool | CloseHandle (HANDLE h) noexcept |
Public Attributes | |
HANDLE | m_h |
Protected Member Functions | |
void | CloseHandleLast () noexcept |
![]() | |
cNonCopyable () noexcept | |
Force the use of Factory creation via protected constructor. More... | |
~cNonCopyable () noexcept | |
Friends | |
class | cOSHandleTests |
Wrap ownership of a OS Kernel HANDLE. (NOT a GUI or User handle) Close on destruct. Any OS system handles that might use CloseHandle() Similar to CHandle in ATL
|
inlineexplicitnoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestaticnoexcept |
default implementation for closing OS HANDLE. ASSUME IsValidHandle(h)
|
inlineprotectednoexcept |
|
inlinenoexcept |
|
inline |
synchronous flush of write data to file.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinestaticnoexcept |
0 is a valid OS handle for linux but NOT _WIN32
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inline |
Change or get the current file position pointer.
HRESULT Gray::cOSHandle::WaitForSingleObject | ( | TIMESYSD_t | dwMilliseconds | ) | const |
Wait for the handle m_h to be signaled. HRESULT_WIN32_C(ERROR_WAIT_TIMEOUT) = after dwMilliseconds
|
inline |
|
friend |
HANDLE Gray::cOSHandle::m_h |