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.

108 lines
2.9 KiB

  1. /*
  2. * basemmc.hxx
  3. *
  4. *
  5. * Copyright (c) 1998-1999 Microsoft Corporation
  6. *
  7. * PURPOSE: Includes all required headers for the basemmc subsystem
  8. *
  9. *
  10. * OWNER: ptousig
  11. */
  12. #ifndef _BASEMMC_HXX_
  13. #define _BASEMMC_HXX_
  14. //
  15. // Forward declarations
  16. //
  17. class CComponent;
  18. class CComponentData;
  19. class CBaseSnapin;
  20. class CBaseSnapinItem;
  21. class CColumnInfoEx;
  22. #define iconNil -1
  23. //
  24. // This string must be defined by the target (exadmin, maildsmx, adcadmin, etc...)
  25. //
  26. extern const tstring szHelpFileTOC; // The name of the TOC within the help file
  27. #undef STRICT
  28. #define STRICT
  29. #ifndef _ATL_APARTMENT_THREADED
  30. #define _ATL_APARTMENT_THREADED
  31. #endif
  32. //--------------------------------------------------------------
  33. // Some macros to register snapins.
  34. //--------------------------------------------------------------
  35. #ifdef BASEMMC_SUB
  36. #define BEGIN_SNAPIN_MAP()
  37. #define SNAPIN_ENTRY(_class, _f) \
  38. { \
  39. CComObject<_class> _m_; \
  40. SC sc = _m_.ScRegister(_f); \
  41. if(sc) \
  42. throw(sc); \
  43. }
  44. #define END_SNAPIN_MAP()
  45. #endif //BASEMMC_SUB
  46. //--------------------------------------------------------------
  47. // Smart pointer declarations
  48. //
  49. // A declaration like DEFINE_PTR(IConsole) translates to
  50. // typedef CComQIPtr<IConsole, &IID_IConsole> IConsolePtr
  51. //--------------------------------------------------------------
  52. #define DEFINE_PTR(_a) typedef CComQIPtr<_a,&IID_##_a> _a##Ptr;
  53. DEFINE_PTR(IRegistrar);
  54. DEFINE_PTR(IResultData);
  55. /*
  56. * BEGIN_CODESPACE_DATA
  57. * END_CODESPACE_DATA
  58. *
  59. * These macros are used to place static data into the code segment rather
  60. * the data segment. This improves performance because the data segement
  61. * doesn't have to be swapped in to access the data and because the data
  62. * is defined in the same code segement as the code that's currently
  63. * running no other pages have to be swapped in. LEGO is also able to
  64. * further optimize the code when it sees data defined in this method.
  65. *
  66. * Usage:
  67. *
  68. * Any statically defined data should be wrapped with these macros. i.e
  69. *
  70. * BEGIN_CODESPACE_DATA
  71. *
  72. * static char sz[]="asfjsdfjlsajdfldsajflk";
  73. *
  74. * END_CODE_SPACE_DATA
  75. *
  76. *
  77. */
  78. #if 1
  79. // This is necessary for the VC 10.0 compiler
  80. #define BEGIN_CODESPACE_DATA
  81. #define END_CODESPACE_DATA
  82. #else
  83. #ifdef WIN32
  84. #define BEGIN_CODESPACE_DATA data_seg(".text")
  85. #define END_CODESPACE_DATA data_seg()
  86. #else
  87. #define BEGIN_CODESPACE_DATA data_seg("_CODE")
  88. #define END_CODESPACE_DATA data_seg()
  89. #endif
  90. #endif
  91. // Free Functions
  92. void DLLAPI DeinitInstanceBaseMMC(void);
  93. SC DLLAPI ScInitApplicationBaseMMC();
  94. SC DLLAPI ScInitInstanceBaseMMC(void);
  95. #endif _BASEMMC_HXX_