summaryrefslogtreecommitdiffstats
path: root/private/ole32/dcomss/olescm/clckpath.hxx
diff options
context:
space:
mode:
authorAdam <you@example.com>2020-05-17 05:51:50 +0200
committerAdam <you@example.com>2020-05-17 05:51:50 +0200
commite611b132f9b8abe35b362e5870b74bce94a1e58e (patch)
treea5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/ole32/dcomss/olescm/clckpath.hxx
downloadNT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst
NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip
Diffstat (limited to 'private/ole32/dcomss/olescm/clckpath.hxx')
-rw-r--r--private/ole32/dcomss/olescm/clckpath.hxx65
1 files changed, 65 insertions, 0 deletions
diff --git a/private/ole32/dcomss/olescm/clckpath.hxx b/private/ole32/dcomss/olescm/clckpath.hxx
new file mode 100644
index 000000000..cd4c7087c
--- /dev/null
+++ b/private/ole32/dcomss/olescm/clckpath.hxx
@@ -0,0 +1,65 @@
+//+-------------------------------------------------------------------------
+//
+// Microsoft Windows
+// Copyright (C) Microsoft Corporation, 1992 - 1993.
+//
+// File: clckpath.hxx
+//
+// Contents: Classes and methods used for single threading binds on
+// a single path.
+//
+// Classes: CLockPath
+//
+// History: 21-Dec-93 Ricksa Created
+// 26-Sep-94 BillMo Simplified to use named mutexes
+//
+//--------------------------------------------------------------------------
+#ifndef __LCKPATH_HXX__
+#define __LCKPATH_HXX__
+
+#include "scm.hxx"
+#include <sem.hxx>
+#include <memapi.hxx>
+
+
+//+-------------------------------------------------------------------------
+//
+// Class: CLockPath
+//
+// Purpose: Handle making sure path gets locked and unlocked
+//
+// History: 21-Dec-93 Ricksa Created
+// 26-Sep-94 BillMo Simplified to use named mutexes
+//
+//--------------------------------------------------------------------------
+class CLockPath
+{
+public:
+ CLockPath(WCHAR *pwszPath, HRESULT& hr);
+ ~CLockPath(void);
+
+private:
+ HANDLE _h;
+};
+
+
+
+//+-------------------------------------------------------------------------
+//
+// Member: CLockPath::~CLockPath
+//
+// Synopsis: Free path lock
+//
+// History: 21-Dec-93 Ricksa Created
+//
+//--------------------------------------------------------------------------
+inline CLockPath::~CLockPath(void)
+{
+ if (_h != NULL)
+ {
+ ReleaseMutex(_h);
+ CloseHandle(_h);
+ }
+}
+
+#endif // __LCKPATH_HXX__