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.

149 lines
3.9 KiB

  1. // This is a part of the Microsoft Management Console.
  2. // Copyright (C) Microsoft Corporation, 1995 - 1999
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Management Console and related
  7. // electronic documentation provided with the interfaces.
  8. // preDNSsn.h : include file for standard system include files,
  9. // or project specific include files that are used frequently,
  10. // but are changed infrequently
  11. //#define _DEBUG_REFCOUNT
  12. // #define _ATL_DEBUG_QI
  13. //#define DEBUG_ALLOCATOR
  14. // often, we have local variables for the express purpose of ASSERTion.
  15. // when compiling retail, those assertions disappear, leaving our locals
  16. // as unreferenced.
  17. #ifndef DBG
  18. #pragma warning (disable: 4189 4100)
  19. #endif // DBG
  20. #define STRICT
  21. #include <nt.h>
  22. #include <ntdef.h>
  23. #include <ntrtl.h>
  24. #include <nturtl.h>
  25. #define NT_INCLUDED
  26. #undef ASSERT
  27. #undef ASSERTMSG
  28. // C++ RTTI
  29. #include <typeinfo.h>
  30. #define IS_CLASS(x,y) (typeid(x) == typeid(y))
  31. ///////////////////////////////////////////
  32. // MFC Headers
  33. #include <afxwin.h>
  34. #include <afxdisp.h>
  35. #include <afxdlgs.h>
  36. #include <afxcmn.h>
  37. #include <afxtempl.h>
  38. #include <prsht.h>
  39. ///////////////////////////////////////////////////////////////////
  40. // miscellanea heades
  41. #include <winsock2.h>
  42. #include <aclui.h>
  43. ///////////////////////////////////////////////////////////////////
  44. // DNS headers
  45. // DNSRPC.H: nonstandard extension used : zero-sized array in struct/union
  46. #pragma warning( disable : 4200) // disable zero-sized array
  47. #include <dnslib.h> // it includes dnsapi.h
  48. #include <dnsrpc.h> // DNS RPC library
  49. // NTDS headers - for domain and forest version
  50. #include <ntdsapi.h>
  51. ///////////////////////////////////////////
  52. // ASSERT's and TRACE's without debug CRT's
  53. #if defined (DBG)
  54. #if !defined (_DEBUG)
  55. #define _USE_MTFRMWK_TRACE
  56. #define _USE_MTFRMWK_ASSERT
  57. #define _MTFRMWK_INI_FILE (L"\\system32\\dnsmgr.ini")
  58. #endif
  59. #endif
  60. #include <dbg.h> // from framework
  61. ///////////////////////////////////////////////////////////////////
  62. // ATL Headers
  63. #include <atlbase.h>
  64. ///////////////////////////////////////////////////////////////////
  65. // CDNSMgrModule
  66. class CDNSMgrModule : public CComModule
  67. {
  68. public:
  69. HRESULT WINAPI UpdateRegistryCLSID(const CLSID& clsid, BOOL bRegister);
  70. };
  71. #define DECLARE_REGISTRY_CLSID() \
  72. static HRESULT WINAPI UpdateRegistry(BOOL bRegister) \
  73. { \
  74. return _Module.UpdateRegistryCLSID(GetObjectCLSID(), bRegister); \
  75. }
  76. extern CDNSMgrModule _Module;
  77. #include <atlcom.h>
  78. /*
  79. * Define/include the stuff we need for WTL::CImageList. We need prototypes
  80. * for IsolationAwareImageList_Read and IsolationAwareImageList_Write here
  81. * because commctrl.h only declares them if __IStream_INTERFACE_DEFINED__
  82. * is defined. __IStream_INTERFACE_DEFINED__ is defined by objidl.h, which
  83. * we can't include before including afx.h because it ends up including
  84. * windows.h, which afx.h expects to include itself. Ugh.
  85. */
  86. HIMAGELIST WINAPI IsolationAwareImageList_Read(LPSTREAM pstm);
  87. BOOL WINAPI IsolationAwareImageList_Write(HIMAGELIST himl,LPSTREAM pstm);
  88. #define _WTL_NO_AUTOMATIC_NAMESPACE
  89. //#include <atlwin21.h>
  90. #include <atlapp.h>
  91. #include <atlwin.h>
  92. #include <atlctrls.h>
  93. ///////////////////////////////////////////////////////////////////
  94. // Console Headers
  95. #include <mmc.h>
  96. ///////////////////////////////////////////////////////////////////
  97. // workaround macro for MFC bug
  98. // (see NTRAID 227193 and MFC "Monte Carlo" RAID db # 1034)
  99. #define FIX_THREAD_STATE_MFC_BUG() \
  100. AFX_MODULE_THREAD_STATE* pState = AfxGetModuleThreadState(); \
  101. CWinThread _dummyWinThread; \
  102. if (pState->m_pCurrentWinThread == NULL) \
  103. { \
  104. pState->m_pCurrentWinThread = &_dummyWinThread; \
  105. }
  106. //
  107. // This determines whether or not the NDNC functionality is enabled or disabled
  108. //
  109. #define USE_NDNC