Files
PowerToys/src/modules/videoconference/VideoConferenceShared/naming.cpp

20 lines
436 B
C++
Raw Normal View History

#include "naming.h"
#include "username.h"
std::wstring ObtainStableGlobalNameForKernelObject(const std::wstring_view name, const bool restricted)
{
static const std::optional<std::wstring> username = ObtainActiveUserName();
std::wstring result = L"Global\\";
if (restricted)
{
result += L"Restricted\\";
}
if (username)
{
result += *username;
}
result += name;
return result;
}