nextcloud-desktop/admin/win/tools/NCToolsShared/SimpleNamedMutex.h
Andy Scherzinger 49038ade94
docs(reuse): Migrate to SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-04-25 17:27:21 +02:00

23 lines
366 B
C++

/*
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <windows.h>
#include <string>
class SimpleNamedMutex
{
public:
SimpleNamedMutex(const std::wstring &name);
bool lock();
void unlock();
private:
std::wstring _name;
HANDLE _hMutex = nullptr;
};