Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
742 B

  1. /*===================================================================
  2. Microsoft Denali
  3. Microsoft Confidential.
  4. Copyright 1996 Microsoft Corporation. All Rights Reserved.
  5. Component: Debug tools
  6. File: debug.cpp
  7. This file contains the routines for helping with debugging.
  8. ===================================================================*/
  9. #include "denpre.h"
  10. #pragma hdrstop
  11. void _ASSERT_IMPERSONATING(void)
  12. {
  13. HANDLE _token;
  14. DWORD _err;
  15. if( OpenThreadToken( GetCurrentThread(), TOKEN_ALL_ACCESS, TRUE, &_token) )
  16. CloseHandle( _token );
  17. else
  18. {
  19. _err = GetLastError();
  20. ASSERT( _err != ERROR_NO_TOKEN );
  21. }
  22. }