UNPKG

libwin32

Version:

Node bindings to native Win32 DLLs through Koffi

24 lines 1.29 kB
import { type HANDLE, type HTOKEN } from '../ctypes.js'; import { type SID, type TOKEN_PRIVILEGES } from '../structs.js'; import type { TOKEN_ } from '../consts.js'; /** * The AdjustTokenPrivileges function enables or disables privileges in the specified access token. * * Note: in libwin32, the function returns the previous state of any privileges that the function modifies. * * https://learn.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-adjusttokenprivileges */ export declare function AdjustTokenPrivileges(tokenHandle: HTOKEN, disableAllPrivileges: boolean, newState?: TOKEN_PRIVILEGES | null): TOKEN_PRIVILEGES | null; /** * Determines whether a specified security identifier (SID) is enabled in an access token. * * https://learn.microsoft.com/en-us/windows/win32/api/securitybaseapi/nf-securitybaseapi-checktokenmembership */ export declare function CheckTokenMembership(tokenHandle: HTOKEN | null, sidToCheck: SID): boolean | null; /** * Opens the access token associated with a process. * * https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-openprocesstoken */ export declare function OpenProcessToken(processHandle: HANDLE, desiredAccess: TOKEN_): HTOKEN | null; //# sourceMappingURL=token.d.ts.map