import { type HANDLE } from '../ctypes.js'; import { type SID, type LUID, type PRIVILEGE_SET } from '../structs.js'; import type { SID_NAME_USE, SE_NAME } from '../consts.js'; /** * Retrieves the name of the user associated with the current thread. * * https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getusernamew */ export declare function GetUserName(): string | null; /** * Retrieves a security identifier (SID) for the account and the name of the domain on which the account was found. * * https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-lookupaccountnamew */ export declare function LookupAccountName(systemName: string | null, accountName: string): LookupAccountNameResult | null; export interface LookupAccountNameResult { sid: SID; referencedDomainName: string; use: SID_NAME_USE; } /** * Retrieves the name that corresponds to the privilege represented on a specific system by a specified locally unique identifier (LUID). * * https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-lookupprivilegenamew */ export declare function LookupPrivilegeName(systemName: string | null, luid: LUID): string | null; /** * Retrieves the locally unique identifier (LUID) used on a specified system to locally represent the specified privilege name. * * https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-lookupprivilegevaluew */ export declare function LookupPrivilegeValue(systemName: string | null, name: SE_NAME): LUID | null; /** * Determines whether a specified set of privileges are enabled in an access token. * * https://learn.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-privilegecheck */ export declare function PrivilegeCheck(clientToken: HANDLE, requiredPrivileges: PRIVILEGE_SET): boolean | null;