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.

82 lines
1.5 KiB

  1. /////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. //
  7. // tm.h
  8. //
  9. //
  10. // Abstract:
  11. //
  12. // this file contains declarations used throughout modules that compose
  13. // termmgr
  14. //
  15. //
  16. ///////////////////////////////////////////////////////////////////////////////
  17. #ifndef ___TM_DOT_H_INCLUDED___
  18. #define ___TM_DOT_H_INCLUDED___
  19. //
  20. // safely load a resource string described by the specified resources id
  21. //
  22. // returns NULL on failure, or the string on success
  23. //
  24. // on success, the caller is responsible for freeing return memory by calling
  25. // SysFreeString()
  26. //
  27. BSTR SafeLoadString( UINT uResourceID );
  28. //
  29. // returns TRUE if the two media types are the equal
  30. //
  31. bool IsEqualMediaType(AM_MEDIA_TYPE const & mt1, AM_MEDIA_TYPE const & mt2);
  32. BOOL IsBadMediaType(IN const AM_MEDIA_TYPE *mt1);
  33. //
  34. // our own assert, so we don't have to use CRT's
  35. //
  36. #ifdef DBG
  37. #define TM_ASSERT(x) { if (!(x)) { DebugBreak(); } }
  38. #else
  39. #define TM_ASSERT(x)
  40. #endif
  41. //
  42. // helper function that dumps allocator properties preceeded by the argument
  43. // string
  44. //
  45. void DumpAllocatorProperties(const char *szString,
  46. const ALLOCATOR_PROPERTIES *pAllocProps);
  47. //
  48. // only dump alloc properties in debug build
  49. //
  50. #ifdef DBG
  51. #define DUMP_ALLOC_PROPS(string, x) DumpAllocatorProperties(string, x);
  52. #else
  53. #define DUMP_ALLOC_PROPS(string, x)
  54. #endif
  55. #endif // ___TM_DOT_H_INCLUDED___