summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/Common.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-21 15:18:22 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-21 15:18:22 +0000
commit1b6462b532772d0d0537a760f34f82daceccb55d (patch)
treee412606ac75116000c7703c1e6d0889f4e7a8542 /plugins/PluginUpdater/src/Common.h
parentbc97d8192aa854aa675ae9cb68c79fca2c7893bc (diff)
PluginUpdater:
- fix for displaying MessageBox over modeless dialog; - auto-handle for a pipe; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@7815 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/Common.h')
-rw-r--r--plugins/PluginUpdater/src/Common.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/PluginUpdater/src/Common.h b/plugins/PluginUpdater/src/Common.h
index 0b07b9098f..7d3bdc7167 100644
--- a/plugins/PluginUpdater/src/Common.h
+++ b/plugins/PluginUpdater/src/Common.h
@@ -132,6 +132,20 @@ extern HWND hwndDialog;
void DoCheck(int iFlag);
void DoGetList(int iFlag);
+struct AutoHandle
+{
+ HANDLE &m_handle;
+
+ AutoHandle(HANDLE &_handle) : m_handle(_handle) {}
+ ~AutoHandle()
+ {
+ if (m_handle) {
+ ::CloseHandle(m_handle);
+ m_handle = 0;
+ }
+ }
+};
+
///////////////////////////////////////////////////////////////////////////////
struct ServListEntry