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.

133 lines
3.1 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. ///////////////////////////////////////////
  50. // ASSERT's and TRACE's without debug CRT's
  51. #if defined (DBG)
  52. #if !defined (_DEBUG)
  53. #define _USE_MTFRMWK_TRACE
  54. #define _USE_MTFRMWK_ASSERT
  55. #define _MTFRMWK_INI_FILE (L"\\system32\\dnsmgr.ini")
  56. #endif
  57. #endif
  58. #include <dbg.h> // from framework
  59. ///////////////////////////////////////////////////////////////////
  60. // ATL Headers
  61. #include <atlbase.h>
  62. ///////////////////////////////////////////////////////////////////
  63. // CDNSMgrModule
  64. class CDNSMgrModule : public CComModule
  65. {
  66. public:
  67. HRESULT WINAPI UpdateRegistryCLSID(const CLSID& clsid, BOOL bRegister);
  68. };
  69. #define DECLARE_REGISTRY_CLSID() \
  70. static HRESULT WINAPI UpdateRegistry(BOOL bRegister) \
  71. { \
  72. return _Module.UpdateRegistryCLSID(GetObjectCLSID(), bRegister); \
  73. }
  74. extern CDNSMgrModule _Module;
  75. #include <atlcom.h>
  76. //#include <atlwin21.h>
  77. #include <atlwin.h>
  78. ///////////////////////////////////////////////////////////////////
  79. // Console Headers
  80. #include <mmc.h>
  81. ///////////////////////////////////////////////////////////////////
  82. // workaround macro for MFC bug
  83. // (see NTRAID 227193 and MFC "Monte Carlo" RAID db # 1034)
  84. #define FIX_THREAD_STATE_MFC_BUG() \
  85. AFX_MODULE_THREAD_STATE* pState = AfxGetModuleThreadState(); \
  86. CWinThread _dummyWinThread; \
  87. if (pState->m_pCurrentWinThread == NULL) \
  88. { \
  89. pState->m_pCurrentWinThread = &_dummyWinThread; \
  90. }
  91. //
  92. // This determines whether or not the NDNC functionality is enabled or disabled
  93. //
  94. #define USE_NDNC