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.

158 lines
3.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: pch.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #if _MSC_VER >= 1000
  11. #pragma once
  12. #endif // _MSC_VER >= 1000
  13. #define STRICT
  14. #define _ATL_APARTMENT_THREADED
  15. //#define _ATL_DISABLE_NO_VTABLE
  16. #define _DELEGWIZ
  17. //////////////////////////////////////////////
  18. // CRT and C++ headers
  19. #pragma warning( disable : 4530) // REVIEW_MARCOC: need to get the -GX flag to work
  20. #include <xstring>
  21. #include <list>
  22. #include <vector>
  23. #include <algorithm>
  24. using namespace std;
  25. //////////////////////////////////////////////
  26. // Windows and ATL headers
  27. #include <windows.h>
  28. //#include <windowsx.h>
  29. #include <shellapi.h>
  30. #include <shlobj.h>
  31. #include <objsel.h>
  32. #include <atlbase.h>
  33. using namespace ATL;
  34. //////////////////////////////////////////
  35. // macros from windowsx.h (conflict in atlwin.h)
  36. #define GET_WM_COMMAND_ID(wp, lp) LOWORD(wp)
  37. #define GET_WM_COMMAND_HWND(wp, lp) (HWND)(lp)
  38. #define GET_WM_COMMAND_CMD(wp, lp) HIWORD(wp)
  39. #define GET_WM_COMMAND_MPS(id, hwnd, cmd) \
  40. (WPARAM)MAKELONG(id, cmd), (LONG)(hwnd)
  41. #define GET_WM_VSCROLL_CODE(wp, lp) LOWORD(wp)
  42. #define GET_WM_VSCROLL_POS(wp, lp) HIWORD(wp)
  43. #define GET_WM_VSCROLL_HWND(wp, lp) (HWND)(lp)
  44. #define GET_WM_VSCROLL_MPS(code, pos, hwnd) \
  45. (WPARAM)MAKELONG(code, pos), (LONG)(hwnd)
  46. #ifndef ARRAYSIZE
  47. #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
  48. #endif
  49. ///////////////////////////////////////////
  50. // ASSERT's and TRACE's without debug CRT's
  51. #if defined (DBG)
  52. #if !defined (_DEBUG)
  53. #define ASSERT
  54. #define TRACE
  55. #define _USE_DSA_TRACE
  56. #define _USE_DSA_ASSERT
  57. #define _USE_DSA_TIMER
  58. #else
  59. #ifndef ASSERT
  60. #define ASSERT(x) _ASSERTE(x)
  61. #endif
  62. #ifndef TRACE
  63. #define TRACE ATLTRACE
  64. #endif
  65. #endif
  66. #else
  67. #define ASSERT
  68. #define TRACE
  69. #endif
  70. #include "dbg.h"
  71. //////////////////////////////////////////
  72. // Miscellanea macros
  73. #define ByteOffset(base, offset) (((LPBYTE)base)+offset)
  74. //////////////////////////////////////////
  75. // COuDelegComModule
  76. class COuDelegComModule : public CComModule
  77. {
  78. public:
  79. COuDelegComModule()
  80. {
  81. m_cfDsObjectNames = 0;
  82. m_cfParentHwnd = 0;
  83. }
  84. HRESULT WINAPI UpdateRegistryCLSID(const CLSID& clsid, BOOL bRegister);
  85. BOOL InitClipboardFormats();
  86. UINT GetCfDsObjectNames() { return m_cfDsObjectNames;}
  87. UINT GetCfParentHwnd() { return m_cfParentHwnd;}
  88. UINT GetCfDsopSelectionList() { return m_cfDsopSelectionList;}
  89. private:
  90. UINT m_cfDsObjectNames;
  91. UINT m_cfParentHwnd;
  92. UINT m_cfDsopSelectionList;
  93. };
  94. extern COuDelegComModule _Module;
  95. //////////////////////////////////////////////////////////////
  96. // further ATL and utility includes
  97. #include <atlcom.h>
  98. #include <atlwin.h>
  99. #include "atldlgs.h" // WTL sheet and ppage classes NenadS
  100. #include <setupapi.h> // to read the .INF file
  101. // ADS headers
  102. #include <iads.h>
  103. #include <activeds.h>
  104. #include <dsclient.h>
  105. #include <dsclintp.h>
  106. #include <dsquery.h>
  107. #include <dsgetdc.h>
  108. #include <cmnquery.h>
  109. #include <aclapi.h>
  110. #include <aclui.h>
  111. #include <ntdsapi.h> // DsBind/DsCrackNames
  112. #include <lm.h> // required for lmapibuf.h
  113. #include <lmapibuf.h> // NetApiBufferFree
  114. #include <propcfg.h> // from the admin\display project (clipboard format)
  115. #include <dscmn.h> // from the admin\display project (CrackName)