SetThreadToken function Null safety advapi32

int SetThreadToken(
  1. Pointer<IntPtr> Thread,
  2. int Token
)

The SetThreadToken function assigns an impersonation token to a thread. The function can also cause a thread to stop using an impersonation token.

BOOL SetThreadToken(
  PHANDLE Thread,
  HANDLE  Token
);

Implementation

int SetThreadToken(Pointer<IntPtr> Thread, int Token) {
  final _SetThreadToken = _advapi32.lookupFunction<
      Int32 Function(Pointer<IntPtr> Thread, IntPtr Token),
      int Function(Pointer<IntPtr> Thread, int Token)>('SetThreadToken');
  return _SetThreadToken(Thread, Token);
}