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.

159 lines
5.8 KiB

  1. #ifndef __ITRANHLP_H_INCLUDED
  2. #define __ITRANHLP_H_INCLUDED
  3. #include <windows.h>
  4. #include <objbase.h>
  5. #include <wia.h>
  6. #if defined(__cplusplus)
  7. extern "C" {
  8. #endif
  9. #include <pshpack8.h>
  10. #define WIA_TRANSFERHELPER_NOPROGRESS 0x00000001 // Don't show progress dialog
  11. #define WIA_TRANSFERHELPER_NOCANCEL 0x00000002 // Don't allow the user to cancel using the system provided progress dialog
  12. #define WIA_TRANSFERHELPER_PRESERVEFAILEDFILE 0x00000004 // If the transfer results in a valid file, even if there is an error, preserve it. Otherwise, it will be deleted.
  13. #undef INTERFACE
  14. #define INTERFACE IWiaTransferHelper
  15. DECLARE_INTERFACE_(IWiaTransferHelper, IUnknown)
  16. {
  17. // *** IUnknown methods ***
  18. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  19. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  20. STDMETHOD_(ULONG,Release) (THIS) PURE;
  21. // *** IWiaTransferHelper methods ***
  22. STDMETHOD(TransferItemFile)( THIS_
  23. IWiaItem *pWiaItem, // IN. Transfer Item
  24. HWND hwndParent, // IN. Parent window for status dialog. NULL ok.
  25. DWORD dwFlags, // IN. Flags
  26. GUID cfFormat, // IN. WiaImgFmt_BMP, etc. Pass 0 for the default file type
  27. LPCWSTR pszFilename, // IN. File to which this data will be stored.
  28. IWiaDataCallback *pCallback, // IN. Optional callback. May specify NULL
  29. LONG nMediaType // IN. Either TYMED_FILE or TYMED_MULTIPAGE_FILE
  30. ) PURE;
  31. STDMETHOD(TransferItemBanded)( THIS_
  32. IWiaItem *pWiaItem, // IN. Transfer Item
  33. HWND hwndParent, // IN. Parent window for status dialog. NULL ok.
  34. DWORD dwFlags, // IN. Flags
  35. GUID cfFormat, // IN. WiaImgFmt_BMP, etc. Pass 0 for the default file type
  36. ULONG ulBufferSize, // IN. Size of transfer buffer. Pass 0 to use the minimum.
  37. IWiaDataCallback *pCallback // IN. Required callback
  38. ) PURE;
  39. };
  40. // {74569BD2-877A-4677-A1E5-ADDA5A09BDBF}
  41. DEFINE_GUID(IID_IWiaTransferHelper, 0x74569BD2, 0x877A, 0x4677, 0xA1, 0xE5, 0xAD, 0xDA, 0x5A, 0x09, 0xBD, 0xBF);
  42. #undef INTERFACE
  43. #define INTERFACE IWiaMiscellaneousHelpers
  44. DECLARE_INTERFACE_(IWiaMiscellaneousHelpers, IUnknown)
  45. {
  46. // *** IUnknown methods ***
  47. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  48. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  49. STDMETHOD_(ULONG,Release) (THIS) PURE;
  50. // *** IWiaMiscellaneousHelper methods ***
  51. STDMETHOD(GetDeviceIcon)( THIS_
  52. LONG nDeviceType,
  53. HICON *phIcon,
  54. int nSize
  55. ) PURE;
  56. };
  57. // {DFF1EE6C-9A4F-4652-990B-315775D42A96}
  58. DEFINE_GUID(IID_IWiaMiscellaneousHelpers, 0xDFF1EE6C, 0x9A4F, 0x4652, 0x99, 0xB, 0x31, 0x57, 0x75, 0xD4, 0x2A, 0x96);
  59. enum CAnnotationType
  60. {
  61. AnnotationNone = 0x00000000,
  62. AnnotationUnknown = 0x00000001,
  63. AnnotationAudio = 0x00000002
  64. };
  65. #undef INTERFACE
  66. #define INTERFACE IWiaAnnotationHelpers
  67. DECLARE_INTERFACE_(IWiaAnnotationHelpers, IUnknown)
  68. {
  69. // *** IUnknown methods ***
  70. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  71. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  72. STDMETHOD_(ULONG,Release) (THIS) PURE;
  73. // *** IWiaAnnotationHelpers methods ***
  74. STDMETHOD(GetAnnotationOverlayIcon)( THIS_
  75. CAnnotationType AnnotationType,
  76. HICON *phIcon,
  77. int nSize
  78. ) PURE;
  79. STDMETHOD(GetAnnotationType)( THIS_
  80. IUnknown *pUnknown,
  81. CAnnotationType &AnnotationType
  82. ) PURE;
  83. STDMETHOD(GetAnnotationFormat)( THIS_
  84. IUnknown *pUnknown,
  85. GUID &guidFormat
  86. ) PURE;
  87. STDMETHOD(GetAnnotationSize)( THIS_
  88. IUnknown *pUnknown,
  89. LONG &nSize,
  90. LONG nMediaType
  91. ) PURE;
  92. STDMETHOD(TransferAttachmentToMemory)( THIS_
  93. IUnknown *pUnknown,
  94. GUID &guidFormat,
  95. HWND hWndProgressParent,
  96. PBYTE *pBuffer,
  97. DWORD *pdwSize
  98. ) PURE;
  99. };
  100. // {30F6E8E8-850C-4241-8440-561EBC221A5E}
  101. DEFINE_GUID( IID_IWiaAnnotationHelpers, 0x30f6e8e8, 0x850c, 0x4241, 0x84, 0x40, 0x56, 0x1e, 0xbc, 0x22, 0x1a, 0x5e );
  102. struct CWiaPaperSize
  103. {
  104. LPWSTR pszName;
  105. ULONG nWidth;
  106. ULONG nHeight;
  107. };
  108. #undef INTERFACE
  109. #define INTERFACE IWiaScannerPaperSizes
  110. DECLARE_INTERFACE_(IWiaScannerPaperSizes, IUnknown)
  111. {
  112. // *** IUnknown methods ***
  113. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE;
  114. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  115. STDMETHOD_(ULONG,Release) (THIS) PURE;
  116. // *** IWiaScannerPaperSizes methods ***
  117. STDMETHOD(GetPaperSizes)( THIS_
  118. CWiaPaperSize **ppPaperSizes,
  119. UINT *pnCount
  120. ) PURE;
  121. STDMETHOD(FreePaperSizes)( THIS_
  122. CWiaPaperSize **ppPaperSizes,
  123. UINT *pnCount
  124. ) PURE;
  125. };
  126. // {E3F1175E-BA5D-445c-8E44-F1D9BD29580D}
  127. DEFINE_GUID(IID_IWiaScannerPaperSizes, 0xe3f1175e, 0xba5d, 0x445c, 0x8e, 0x44, 0xf1, 0xd9, 0xbd, 0x29, 0x58, 0xd);
  128. #include <poppack.h>
  129. #if defined(__cplusplus)
  130. };
  131. #endif
  132. #endif //__ITRANHLP_H_INCLUDED