diff options
author | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
---|---|---|
committer | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
commit | e611b132f9b8abe35b362e5870b74bce94a1e58e (patch) | |
tree | a5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/ole32/dcomss/olescm/clckpath.hxx | |
download | NT4.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.hxx | 65 |
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__ |