MCPcopy Create free account
hub / github.com/Apache553/SubtitleFontHelper / QueryCache

Method QueryCache

FontLoadInterceptor/RpcClient.cpp:66–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 std::mutex m_lock;
65
66 QueryCache()
67 {
68 try
69 {
70 std::wstring versionShmName = L"SubtitleFontAutoLoaderSHM-";
71 versionShmName += GetCurrentProcessUserSid();
72 m_version.reset(CreateFileMappingW(
73 INVALID_HANDLE_VALUE,
74 nullptr,
75 PAGE_READWRITE,
76 0, 4,
77 versionShmName.c_str()));
78 THROW_LAST_ERROR_IF(!m_version.is_valid());
79 m_versionMem.reset(static_cast<uint32_t*>(MapViewOfFile(
80 m_version.get(),
81 FILE_MAP_WRITE,
82 0, 0,
83 sizeof(uint32_t))));
84 THROW_LAST_ERROR_IF(m_versionMem.get() == nullptr);
85 }
86 catch (...)
87 {
88 }
89 m_good = true;
90 }
91
92 public:
93 static QueryCache& GetInstance()

Callers

nothing calls this directly

Calls 1

GetCurrentProcessUserSidFunction · 0.85

Tested by

no test coverage detected