Leaked source code of windows server 2003
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.

78 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Module Name:
  4. resinfo.h
  5. Abstract:
  6. Resource owner info header. Used for tracking resources in debug build
  7. Author:
  8. Richard L Firth (rfirth) 16-Feb-1995
  9. Revision History:
  10. 16-Feb-1995 rfirth
  11. Created
  12. --*/
  13. #if INET_DEBUG
  14. //
  15. // types
  16. //
  17. //typedef struct {
  18. // DWORD Tid;
  19. // DWORD CallersAddress;
  20. // DWORD CallersCaller;
  21. // DWORD SourceFileLine;
  22. // LPSTR SourceFileName;
  23. //} RESOURCE_INFO, *LPRESOURCE_INFO;
  24. typedef struct {
  25. DWORD Tid;
  26. LPSTR SourceFileName;
  27. DWORD SourceFileLine;
  28. } RESOURCE_INFO, *LPRESOURCE_INFO;
  29. //#define GET_RESOURCE_INFO(pResource) \
  30. // { \
  31. // (pResource)->Tid = GetCurrentThreadId(); \
  32. // (pResource)->CallersAddress = 0; \
  33. // (pResource)->CallersCaller = 0; \
  34. // (pResource)->SourceFileLine = __LINE__; \
  35. // (pResource)->SourceFileName = __FILE__; \
  36. // }
  37. #define GET_RESOURCE_INFO(pResource) \
  38. { \
  39. (pResource)->Tid = GetCurrentThreadId(); \
  40. (pResource)->SourceFileName = __FILE__; \
  41. (pResource)->SourceFileLine = __LINE__; \
  42. }
  43. //#define INITIALIZE_RESOURCE_INFO(pResource) \
  44. // { \
  45. // (pResource)->Tid = GetCurrentThreadId(); \
  46. // (pResource)->CallersAddress = 0; \
  47. // (pResource)->CallersCaller = 0; \
  48. // (pResource)->SourceFileLine = __LINE__; \
  49. // (pResource)->SourceFileName = __FILE__; \
  50. // }
  51. #define INITIALIZE_RESOURCE_INFO(pResource) \
  52. { \
  53. (pResource)->Tid = GetCurrentThreadId(); \
  54. (pResource)->SourceFileName = __FILE__; \
  55. (pResource)->SourceFileLine = __LINE__; \
  56. }
  57. #else
  58. #define GET_RESOURCE_INFO(pResource)
  59. #define INITIALIZE_RESOURCE_INFO(pResource)
  60. #endif // INET_DEBUG