summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus/src/Utils.h
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-09-24 16:30:09 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-09-24 16:30:09 +0000
commit5cfd54b9152944f686c2ca2402e85280b3130f32 (patch)
treef0487a6e40e82743e729fa6e56b375dde334333d /plugins/SendScreenshotPlus/src/Utils.h
parentc35fd2f8545f73f5dacded24bd8124a9b575c98d (diff)
SendSS: correct version of prevoious commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@15434 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SendScreenshotPlus/src/Utils.h')
-rw-r--r--plugins/SendScreenshotPlus/src/Utils.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/SendScreenshotPlus/src/Utils.h b/plugins/SendScreenshotPlus/src/Utils.h
index 0beeaabd18..94e5a73ea4 100644
--- a/plugins/SendScreenshotPlus/src/Utils.h
+++ b/plugins/SendScreenshotPlus/src/Utils.h
@@ -75,4 +75,17 @@ void SaveTIF(HBITMAP hBmp, TCHAR* szFilename);
//void ShowPopup(char *title, char *text);
*/
+
+class EventHandle
+{
+ HANDLE _hEvent;
+public:
+ inline EventHandle() { _hEvent = CreateEvent(NULL, 0, 0, NULL); }
+ inline ~EventHandle() { CloseHandle(_hEvent); }
+ inline void Set() { SetEvent(_hEvent); }
+ inline void Wait() { WaitForSingleObject(_hEvent, INFINITE); }
+ inline void Wait(DWORD dwMilliseconds) { WaitForSingleObject(_hEvent, dwMilliseconds); }
+ inline operator HANDLE() { return _hEvent; }
+};
+
#endif