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.

181 lines
4.7 KiB

  1. /*****************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 2000
  4. *
  5. * TITLE: precomp.h
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: RickTu
  10. *
  11. * DATE: 10/12/00
  12. *
  13. * DESCRIPTION: Precompiled header for photowiz dll
  14. *
  15. *****************************************************************************/
  16. #ifndef _PHOTOWIZ_PRECOMP_H_
  17. #define _PHOTOWIZ_PRECOMP_H_
  18. #include <nt.h>
  19. #include <ntrtl.h>
  20. #include <nturtl.h>
  21. #include <ntexapi.h>
  22. #include <windows.h>
  23. #include <commctrl.h>
  24. #include <commoncontrols.h>
  25. #include <objbase.h>
  26. #include <advpub.h>
  27. #include <shellapi.h>
  28. #include <shlobj.h>
  29. #include <shlwapi.h>
  30. #include <shlwapip.h>
  31. #include <shlobjp.h>
  32. #include <shlguidp.h>
  33. #include <commctrl.h>
  34. #include <comctrlp.h>
  35. #include <compstui.h>
  36. #include <winddiui.h>
  37. #include <winspool.h>
  38. #include <prsht.h>
  39. #include <shpriv.h>
  40. #include <shfusion.h>
  41. #include <atlbase.h>
  42. #include <msxml.h>
  43. #include <urlmon.h>
  44. #include <errno.h>
  45. #include <gdiplus.h>
  46. #include <gdiplusinit.h>
  47. #include <assert.h>
  48. // psutil stuff
  49. #include <psutil.h>
  50. #include <tmplutil.h>
  51. #include <wiadebug.h>
  52. #include <uicommon.h>
  53. #include <wiatextc.h>
  54. #include <wiadevdp.h>
  55. #include <annotlib.h>
  56. #include <strsafe.h>
  57. //
  58. // Trace mask fields
  59. //
  60. #define TRACE_CF 0x80000000
  61. #define TRACE_REF_COUNTS 0x40000000
  62. #define TRACE_UTIL 0x20000000
  63. #define TRACE_DLGPROC 0x10000000
  64. #define TRACE_WIZ_INFO_BLOB 0x08000000
  65. #define TRACE_IDLIST 0x04000000
  66. #define TRACE_XML 0x02000000
  67. #define TRACE_LIST_ITEM 0x01000000
  68. #define TRACE_PRINTTO 0x00800000
  69. #define TRACE_PREVIEW 0x00000800
  70. #define TRACE_PREVIEW_BITMAP 0x00000400
  71. #define TRACE_TEMPLATE 0x00000200
  72. #define TRACE_PAGE_END 0x00000100
  73. #define TRACE_PAGE_STATUS 0x00000080
  74. #define TRACE_PAGE_SEL_TEMPLATE 0x00000040
  75. #define TRACE_PAGE_PRINT_OPT 0x00000020
  76. #define TRACE_PAGE_PHOTO_SEL 0x00000010
  77. #define TRACE_PAGE_START 0x00000008
  78. #define TRACE_PHOTO_ITEM 0x00000004
  79. #define TRACE_WIZ 0x00000002
  80. #define TRACE_DROP 0x00000001
  81. #define RESOLVE_PRINTER_MACROS 1
  82. // from dll.cpp
  83. EXTERN_C HINSTANCE g_hInst;
  84. EXTERN_C ATOM g_cPreviewClassWnd;
  85. STDAPI_(void) DllAddRef(void);
  86. STDAPI_(void) DllRelease(void);
  87. HMODULE GetThreadHMODULE( LPTHREAD_START_ROUTINE pfnThreadProc );
  88. STDAPI PPWCoInitialize(void);
  89. #define PPWCoUninitialize(hr) if(SUCCEEDED(hr)){CoUninitialize();}
  90. //
  91. // Needs to be global
  92. //
  93. extern Gdiplus::Color g_wndColor;
  94. typedef struct {
  95. RECT rcDevice;
  96. BOOL bDeviceIsScreen;
  97. SIZE DPI;
  98. RECT rcNominalTemplatePrintArea;
  99. RECT rcNominalPageClip;
  100. SIZE NominalDevicePrintArea;
  101. SIZE NominalPageOffset;
  102. SIZE NominalPhysicalSize;
  103. SIZE NominalPhysicalOffset;
  104. } RENDER_DIMENSIONS, *LPRENDER_DIMENSIONS;
  105. #include "cfdefs.h"
  106. #include "prwiziid.h"
  107. #include "resource.h"
  108. #include "item.h"
  109. #include "listitem.h"
  110. #include "xmltools2.h"
  111. #include "preview.h"
  112. #include "status.h"
  113. #include "photosel.h" // photosel.h must come after item.h
  114. #include "wizblob.h" // wizblob.h must come after item.h, preview.h
  115. #include "printopt.h"
  116. #include "seltemp.h"
  117. #include "start.h"
  118. #include "end.h"
  119. #define SIZEOF sizeof
  120. #define MAX_WIZPAGES 6
  121. #define DEFAULT_THUMB_WIDTH 120
  122. #define DEFAULT_THUMB_HEIGHT 120
  123. //
  124. // Let's define some custom error codes so that we can give better error messages
  125. //
  126. #define FACILITY_PPW 0x777
  127. #define PPW_E_UNABLE_TO_ROTATE MAKE_HRESULT(SEVERITY_ERROR,FACILITY_PPW,0x1)
  128. // from drop.cpp
  129. STDAPI CPrintPhotosDropTarget_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  130. // from printwiz.cpp
  131. STDAPI CPrintPhotosWizard_CreateInstance(IUnknown* pUnkOuter, IUnknown** ppunk, LPCOBJECTINFO poi);
  132. // from ccstock.h in nt\shell\inc
  133. #ifdef __cplusplus
  134. #define IID_PPV_ARG(IType, ppType) IID_##IType, reinterpret_cast<void**>(static_cast<IType**>(ppType))
  135. #define IID_X_PPV_ARG(IType, X, ppType) IID_##IType, X, reinterpret_cast<void**>(static_cast<IType**>(ppType))
  136. #else
  137. #define IID_PPV_ARG(IType, ppType) &IID_##IType, (void**)(ppType)
  138. #define IID_X_PPV_ARG(IType, X, ppType) &IID_##IType, X, (void**)(ppType)
  139. #endif
  140. #define IID_PPV_ARG_NULL(IType, ppType) IID_X_PPV_ARG(IType, NULL, ppType)
  141. // from netwiz.h in nt\shell\ext\netplwiz
  142. typedef struct
  143. {
  144. LPCWSTR idPage;
  145. DLGPROC pDlgProc;
  146. LPCWSTR pHeading;
  147. LPCWSTR pSubHeading;
  148. DWORD dwFlags;
  149. } WIZPAGE;
  150. #endif // !_PHOTOWIZ_PRECOMP_H_