Platform SDK: Access Control

ImpersonateAnonymousToken

The ImpersonateAnonymousToken function enables the specified thread to impersonate the system's anonymous logon token.

BOOL ImpersonateAnonymousToken(
  HANDLE ThreadHandle  // handle to thread
);

Parameters

ThreadHandle
[in] Handle to the thread to impersonate the system's anonymous logon token.

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Winbase.h; include Windows.h.
  Library: Use Advapi32.lib.

See Also

Access Control Overview, Access Control Functions