| Index: src/shared/AutoHandle.cpp |
| =================================================================== |
| new file mode 100644 |
| --- /dev/null |
| +++ b/src/shared/AutoHandle.cpp |
| @@ -0,0 +1,21 @@ |
| +#include PRECOMPILED_HEADER_FILE |
| + |
|
Oleksandr
2013/05/27 15:32:26
It is usually just #include stdafx.h. No need to u
|
| +#include "AutoHandle.h" |
| + |
| +AutoHandle::AutoHandle() |
| +{ |
| +} |
| + |
| +AutoHandle::AutoHandle(HANDLE handle) : handle(handle) |
| +{ |
| +} |
| + |
| +AutoHandle::~AutoHandle() |
| +{ |
| + CloseHandle(handle); |
| +} |
| + |
| +HANDLE AutoHandle::get() |
|
Wladimir Palant
2013/05/27 09:51:55
I would rather do this as AutoHandle::operator HAN
Felix Dahlke
2013/06/04 09:50:40
That's actually nicer, will do.
|
| +{ |
| + return handle; |
| +} |