diff --git a/include/stdex/sys_info.hpp b/include/stdex/sys_info.hpp index 2efeb22ff..1162d6097 100644 --- a/include/stdex/sys_info.hpp +++ b/include/stdex/sys_info.hpp @@ -193,12 +193,12 @@ namespace stdex TOKEN_ELEVATION elevation; DWORD size = sizeof(TOKEN_ELEVATION); - if (GetTokenInformation(token_h, TokenElevation, &elevation, sizeof(elevation), &size)) + if (GetTokenInformation(token, TokenElevation, &elevation, sizeof(elevation), &size)) elevated = elevation.TokenIsElevated; - GetTokenInformation(token.get(), TokenGroups, NULL, 0, &size); + GetTokenInformation(token, TokenGroups, NULL, 0, &size); std::unique_ptr groups((TOKEN_GROUPS*)new uint8_t[size]); - if (GetTokenInformation(token.get(), TokenGroups, (LPVOID)groups.get(), size, &size)) { + if (GetTokenInformation(token, TokenGroups, (LPVOID)groups.get(), size, &size)) { SID_IDENTIFIER_AUTHORITY authority = SECURITY_NT_AUTHORITY; PSID sid_admins_h = NULL; if (AllocateAndInitializeSid(&authority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &sid_admins_h)) { diff --git a/include/stdex/system.hpp b/include/stdex/system.hpp index d7ee4b081..43e64bdff 100644 --- a/include/stdex/system.hpp +++ b/include/stdex/system.hpp @@ -198,7 +198,7 @@ namespace stdex /// /// Returns object handle /// - T get() const noexcept { return m_h; } + operator T() const noexcept { return m_h; } protected: T m_h;