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.

77 lines
2.1 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: otrackp.h
  7. //
  8. // Contents: Private definitions for Object Tracking system
  9. //
  10. // History: 6-Apr-92 MikeSe Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #ifndef __OTRACKP_HXX__
  14. #define __OTRACKP_HXX__
  15. // Entry type in history record
  16. enum FrameType { FT_CREATE, FT_ADDREF, FT_RELEASE };
  17. // Number of call frame to record
  18. #define MAX_CALLERS 8
  19. // A single entry in the history
  20. struct FrameRecord
  21. {
  22. FrameRecord *frNext;
  23. FrameType ft;
  24. ULONG cRefCount;
  25. void * callers[MAX_CALLERS];
  26. };
  27. #define TRACK_LINK_SIGNATURE 0x4C53544F
  28. #define REFCOUNT_NOT_SET 0xFFFFFFFF
  29. // This structure is the root point for the history for an object.
  30. // It is pointed to by the _tl member variable in the ObjectTracker
  31. // class (see otrack.hxx).
  32. struct TrackLink
  33. {
  34. TrackLink *tlNext; // link together
  35. TrackLink *tlPrev; // ...
  36. ULONG ulSig; // validity signature
  37. ObjectTracker *potr; // back link to object
  38. char *pszName; // class name
  39. int fTrack; // true if tracking should be done
  40. FrameRecord *frFirst; // first call frame
  41. FrameRecord *frLast; // last call frame
  42. };
  43. // This structure holds the name of a class and a flag indicating if
  44. // object tracking is currently on or off for this class.
  45. struct NameEntry
  46. {
  47. NameEntry *neNext; // link together
  48. NameEntry *nePrev; // ...
  49. int fTrack; // tracking on/off for this class
  50. char *pszName; // class name
  51. };
  52. #ifdef ANYSTRICT
  53. DECLARE_DEBUG(Ot)
  54. # define OtDebugOut(x) OtInlineDebugOut x
  55. # define OtAssert(x) Win4Assert(x)
  56. #else
  57. # define OtDebugOut(x)
  58. # define OtAssert(x)
  59. #endif
  60. #endif // of ifndef __OTRACKP_HXX__