GetTokenInformation function Null safety advapi32

int GetTokenInformation(
  1. int TokenHandle,
  2. int TokenInformationClass,
  3. Pointer<NativeType> TokenInformation,
  4. int TokenInformationLength,
  5. Pointer<Uint32> ReturnLength
)

The GetTokenInformation function retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information.

BOOL GetTokenInformation(
  HANDLE                  TokenHandle,
  TOKEN_INFORMATION_CLASS TokenInformationClass,
  LPVOID                  TokenInformation,
  DWORD                   TokenInformationLength,
  PDWORD                  ReturnLength
);

Implementation

int GetTokenInformation(
        int TokenHandle,
        int TokenInformationClass,
        Pointer TokenInformation,
        int TokenInformationLength,
        Pointer<Uint32> ReturnLength) =>
    _GetTokenInformation(TokenHandle, TokenInformationClass, TokenInformation,
        TokenInformationLength, ReturnLength);