CreateRestrictedToken method

int CreateRestrictedToken(
  1. Pointer<Void> ExistingTokenHandle,
  2. int Flags,
  3. int DisableSidCount,
  4. Pointer<PSID_AND_ATTRIBUTES> SidsToDisable,
  5. int DeletePrivilegeCount,
  6. Pointer<PLUID_AND_ATTRIBUTES> PrivilegesToDelete,
  7. int RestrictedSidCount,
  8. Pointer<PSID_AND_ATTRIBUTES> SidsToRestrict,
  9. Pointer<Pointer<Void>> NewTokenHandle,
)

Implementation

int CreateRestrictedToken(
  ffi.Pointer<ffi.Void> ExistingTokenHandle,
  int Flags,
  int DisableSidCount,
  ffi.Pointer<PSID_AND_ATTRIBUTES> SidsToDisable,
  int DeletePrivilegeCount,
  ffi.Pointer<PLUID_AND_ATTRIBUTES> PrivilegesToDelete,
  int RestrictedSidCount,
  ffi.Pointer<PSID_AND_ATTRIBUTES> SidsToRestrict,
  ffi.Pointer<ffi.Pointer<ffi.Void>> NewTokenHandle,
) {
  return (_CreateRestrictedToken ??= _dylib.lookupFunction<
      _c_CreateRestrictedToken,
      _dart_CreateRestrictedToken>('CreateRestrictedToken'))(
    ExistingTokenHandle,
    Flags,
    DisableSidCount,
    SidsToDisable,
    DeletePrivilegeCount,
    PrivilegesToDelete,
    RestrictedSidCount,
    SidsToRestrict,
    NewTokenHandle,
  );
}