diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-09-24 16:30:09 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-09-24 16:30:09 +0000 |
commit | 5cfd54b9152944f686c2ca2402e85280b3130f32 (patch) | |
tree | f0487a6e40e82743e729fa6e56b375dde334333d /plugins/SendScreenshotPlus/src/Utils.h | |
parent | c35fd2f8545f73f5dacded24bd8124a9b575c98d (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.h | 13 |
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 |