DuplicateTokenEx method

int DuplicateTokenEx(
  1. Pointer<Void> hExistingToken,
  2. int dwDesiredAccess,
  3. Pointer<LPSECURITY_ATTRIBUTES> lpTokenAttributes,
  4. int ImpersonationLevel,
  5. int TokenType,
  6. Pointer<Pointer<Void>> phNewToken,
)

Implementation

int DuplicateTokenEx(
  ffi.Pointer<ffi.Void> hExistingToken,
  int dwDesiredAccess,
  ffi.Pointer<LPSECURITY_ATTRIBUTES> lpTokenAttributes,
  int ImpersonationLevel,
  int TokenType,
  ffi.Pointer<ffi.Pointer<ffi.Void>> phNewToken,
) {
  return (_DuplicateTokenEx ??=
      _dylib.lookupFunction<_c_DuplicateTokenEx, _dart_DuplicateTokenEx>(
          'DuplicateTokenEx'))(
    hExistingToken,
    dwDesiredAccess,
    lpTokenAttributes,
    ImpersonationLevel,
    TokenType,
    phNewToken,
  );
}