Public Member Functions | |
CSmartHandle () | |
Construct a CSmartHandle that doesn't, currently, own a HANDLE. | |
CSmartHandle (SC_HANDLE handle) | |
Construct a CSmartHandle that takes ownership of the supplied HANDLE. | |
~CSmartHandle () | |
CSmartHandle & | operator= (SC_HANDLE handle) |
SC_HANDLE | Get () const |
Access the handle. | |
void | Attach (SC_HANDLE handle) |
Take ownership of the supplied HANDLE. | |
SC_HANDLE | Detach () |
No longer manage ownership of the HANDLE and return it. | |
void | Close () |
Close any handle that is managed by this CSmartHandle. | |
bool | IsValid () const |
Returns true if the CSmartHandle currently has ownership of a HANDLE. |
CSmartHandle | ( | ) |
Construct a CSmartHandle that doesn't, currently, own a HANDLE.
CSmartHandle | ( | SC_HANDLE | handle | ) | [explicit] |
Construct a CSmartHandle that takes ownership of the supplied HANDLE.
~CSmartHandle | ( | ) |
CSmartHandle & operator= | ( | SC_HANDLE | handle | ) |
SC_HANDLE Get | ( | ) | const |
Access the handle.
void Attach | ( | SC_HANDLE | handle | ) |
Take ownership of the supplied HANDLE.
SC_HANDLE Detach | ( | ) |
No longer manage ownership of the HANDLE and return it.
void Close | ( | ) |
Close any handle that is managed by this CSmartHandle.
bool IsValid | ( | ) | const |
Returns true if the CSmartHandle currently has ownership of a HANDLE.