mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
23 lines
366 B
C++
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;
|
|
};
|