You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// code submitted in pull request from https://github.com/sbtoonz, authored by KeePassXC https://github.com/keepassxreboot/keepassxc/blob/dab7047113c4ad4ffead944d5c4ebfb648c1d0b0/src/core/Bootstrap.cpp#L121
9
+
inlineboolLockMemAccess()
10
+
{
11
+
bool bSuccess = false;
12
+
// Process token and user
13
+
HANDLE hToken = nullptr;
14
+
PTOKEN_USER pTokenUser = nullptr;
15
+
DWORD cbBufferSize = 0;
16
+
17
+
// Access control list
18
+
PACL pACL = nullptr;
19
+
DWORD cbACL = 0;
20
+
21
+
// Open the access token associated with the calling process
22
+
if (!OpenProcessToken(
23
+
GetCurrentProcess(),
24
+
TOKEN_QUERY,
25
+
&hToken
26
+
)) {
27
+
goto Cleanup;
28
+
}
29
+
30
+
// Retrieve the token information in a TOKEN_USER structure
0 commit comments