Windows NT 4.0 source code leak
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.

57 lines
891 B

4 years ago
  1. // TITLE("Get Current TEB Pointer")
  2. //++
  3. //
  4. // Copyright (c) 1992 Digital Equipment Corporation
  5. //
  6. // Module Name:
  7. //
  8. // ntcurteb.s
  9. //
  10. // Abstract:
  11. //
  12. // This module implements the function to retrieve the current TEB pointer.
  13. //
  14. // Author:
  15. //
  16. // Joe Notarangelo 29-Jul-1992
  17. //
  18. // Environment:
  19. //
  20. // Any mode.
  21. //
  22. // Revision History:
  23. //
  24. //--
  25. #include "ksalpha.h"
  26. //++
  27. //
  28. // PTEB
  29. // NtCurrentTeb(
  30. // VOID
  31. // )
  32. //
  33. // Routine Description:
  34. //
  35. // This function returns the current TEB pointer retrieved via an unprivileged
  36. // call pal. Since the call pal is unprivileged this routine is appropriate in
  37. // any mode.
  38. //
  39. // Arguments:
  40. //
  41. // None.
  42. //
  43. // Return Value:
  44. //
  45. // Current TEB pointer.
  46. //
  47. //--
  48. LEAF_ENTRY(NtCurrentTeb)
  49. GET_THREAD_ENVIRONMENT_BLOCK // (PALcode) result in v0
  50. ret zero, (ra) // return
  51. .end NtCurrentTeb