WiaDef.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:61k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /****************************************************************************
  2. *
  3. *  (C) COPYRIGHT 1998-2000, MICROSOFT CORP.
  4. *
  5. *  FILE:        wiadef.h
  6. *
  7. *  VERSION:     2.0
  8. *
  9. *  DATE:        7/27/2000
  10. *
  11. *  DESCRIPTION:
  12. *    Defines WIA constants.
  13. *
  14. *****************************************************************************/
  15. #ifndef _WIADEF_H_
  16. #define _WIADEF_H_
  17. //
  18. // Set packing
  19. //
  20. #include <pshpack8.h>
  21. //
  22. // Include COM definitions
  23. //
  24. #ifndef _NO_COM
  25. #include <objbase.h>
  26. #endif
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. /**************************************************************************
  31. *
  32. * WIA Errors
  33. *
  34. ***************************************************************************/
  35. //
  36. // Define the facility code. Move this to sdkinc???
  37. //
  38. #define FACILITY_WIA 33
  39. //
  40. // Definitions for WIA_ERRORs and WIA_STATUSs. Applications can test for these returns
  41. // on API return, to keep users informed of conditions which a user
  42. // could correct.
  43. //
  44. #define BASE_VAL_WIA_ERROR   0x00000000
  45. #define BASE_VAL_WIA_SUCCESS 0x00000000
  46. #define WIA_ERROR_GENERAL_ERROR              MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 1))
  47. #define WIA_ERROR_PAPER_JAM                  MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 2))
  48. #define WIA_ERROR_PAPER_EMPTY                MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 3))
  49. #define WIA_ERROR_PAPER_PROBLEM              MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 4))
  50. #define WIA_ERROR_OFFLINE                    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 5))
  51. #define WIA_ERROR_BUSY                       MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 6))
  52. #define WIA_ERROR_WARMING_UP                 MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 7))
  53. #define WIA_ERROR_USER_INTERVENTION          MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 8))
  54. #define WIA_ERROR_ITEM_DELETED               MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 9))
  55. #define WIA_ERROR_DEVICE_COMMUNICATION       MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 10))
  56. #define WIA_ERROR_INVALID_COMMAND            MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 11))
  57. #define WIA_ERROR_INCORRECT_HARDWARE_SETTING MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 12))
  58. #define WIA_ERROR_DEVICE_LOCKED              MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 13))
  59. #define WIA_ERROR_EXCEPTION_IN_DRIVER        MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 14))
  60. #define WIA_ERROR_INVALID_DRIVER_RESPONSE    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 15))
  61. #define WIA_STATUS_END_OF_MEDIA              MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_WIA, (BASE_VAL_WIA_SUCCESS + 1))
  62. //
  63. // Returned by SelectDeviceDlg and SelectDeviceDlgId when there are no devices avaiable
  64. //
  65. #define WIA_S_NO_DEVICE_AVAILABLE            MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIA, (BASE_VAL_WIA_ERROR + 21))
  66. //
  67. // SelectDeviceDlg & GetImageDlg flags
  68. //
  69. #define WIA_SELECT_DEVICE_NODEFAULT          0x00000001
  70. //
  71. // GetImageDlg & DeviceDlg flags
  72. //
  73. #define WIA_DEVICE_DIALOG_SINGLE_IMAGE       0x00000002  // Only allow one image to be selected
  74. #define WIA_DEVICE_DIALOG_USE_COMMON_UI      0x00000004  // Give preference to the system-provided UI, if available
  75. //**************************************************************************
  76. //
  77. // Image types
  78. //
  79. //**************************************************************************
  80. DEFINE_GUID(WiaImgFmt_UNDEFINED, 0xb96b3ca9,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  81. DEFINE_GUID(WiaImgFmt_RAWRGB, 0xbca48b55,0xf272,0x4371,0xb0,0xf1,0x4a,0x15,0xd,0x5,0x7b,0xb4);
  82. DEFINE_GUID(WiaImgFmt_MEMORYBMP, 0xb96b3caa,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  83. DEFINE_GUID(WiaImgFmt_BMP, 0xb96b3cab,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  84. DEFINE_GUID(WiaImgFmt_EMF, 0xb96b3cac,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  85. DEFINE_GUID(WiaImgFmt_WMF, 0xb96b3cad,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  86. DEFINE_GUID(WiaImgFmt_JPEG, 0xb96b3cae,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  87. DEFINE_GUID(WiaImgFmt_PNG, 0xb96b3caf,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  88. DEFINE_GUID(WiaImgFmt_GIF, 0xb96b3cb0,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  89. DEFINE_GUID(WiaImgFmt_TIFF, 0xb96b3cb1,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  90. DEFINE_GUID(WiaImgFmt_EXIF, 0xb96b3cb2,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  91. DEFINE_GUID(WiaImgFmt_PHOTOCD, 0xb96b3cb3,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  92. DEFINE_GUID(WiaImgFmt_FLASHPIX, 0xb96b3cb4,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  93. DEFINE_GUID(WiaImgFmt_ICO, 0xb96b3cb5,0x0728,0x11d3,0x9d,0x7b,0x00,0x00,0xf8,0x1e,0xf3,0x2e);
  94. // Canon Image File Format
  95. DEFINE_GUID(WiaImgFmt_CIFF,0x9821a8ab,0x3a7e,0x4215,0x94,0xe0,0xd2,0x7a,0x46,0x0c,0x03,0xb2);
  96. // Quickdraw Image Format
  97. DEFINE_GUID(WiaImgFmt_PICT,0xa6bc85d8,0x6b3e,0x40ee,0xa9,0x5c,0x25,0xd4,0x82,0xe4,0x1a,0xdc);
  98. // JPEG 2000 baseline file format
  99. DEFINE_GUID(WiaImgFmt_JPEG2K,0x344ee2b2,0x39db,0x4dde,0x81,0x73,0xc4,0xb7,0x5f,0x8f,0x1e,0x49);
  100. // JPEG 2000 extended file format
  101. DEFINE_GUID(WiaImgFmt_JPEG2KX,0x43e14614,0xc80a,0x4850,0xba,0xf3,0x4b,0x15,0x2d,0xc8,0xda,0x27);
  102. //**************************************************************************
  103. //
  104. // Document and other types
  105. //
  106. // Note: HTML, AVI, and MPEG used to have different GUIDs. Use the GUIDs
  107. //       defined below from now on.
  108. //
  109. //**************************************************************************
  110. DEFINE_GUID(WiaImgFmt_RTF, 0x573dd6a3,0x4834,0x432d,0xa9,0xb5,0xe1,0x98,0xdd,0x9e,0x89,0xd);
  111. DEFINE_GUID(WiaImgFmt_XML, 0xb9171457,0xdac8,0x4884,0xb3,0x93,0x15,0xb4,0x71,0xd5,0xf0,0x7e);
  112. DEFINE_GUID(WiaImgFmt_HTML, 0xc99a4e62,0x99de,0x4a94,0xac,0xca,0x71,0x95,0x6a,0xc2,0x97,0x7d);
  113. DEFINE_GUID(WiaImgFmt_TXT, 0xfafd4d82,0x723f,0x421f,0x93,0x18,0x30,0x50,0x1a,0xc4,0x4b,0x59);
  114. DEFINE_GUID(WiaImgFmt_MPG, 0xecd757e4,0xd2ec,0x4f57,0x95,0x5d,0xbc,0xf8,0xa9,0x7c,0x4e,0x52);
  115. DEFINE_GUID(WiaImgFmt_AVI, 0x32f8ca14,0x87c,0x4908,0xb7,0xc4,0x67,0x57,0xfe,0x7e,0x90,0xab);
  116. DEFINE_GUID(WiaImgFmt_ASF, 0x8d948ee9,0xd0aa,0x4a12,0x9d,0x9a,0x9c,0xc5,0xde,0x36,0x19,0x9b);
  117. DEFINE_GUID(WiaImgFmt_SCRIPT, 0xfe7d6c53,0x2dac,0x446a,0xb0,0xbd,0xd7,0x3e,0x21,0xe9,0x24,0xc9);
  118. DEFINE_GUID(WiaImgFmt_EXEC, 0x485da097,0x141e,0x4aa5,0xbb,0x3b,0xa5,0x61,0x8d,0x95,0xd0,0x2b);
  119. DEFINE_GUID(WiaImgFmt_UNICODE16,0x1b7639b6,0x6357,0x47d1,0x9a,0x07,0x12,0x45,0x2d,0xc0,0x73,0xe9);
  120. DEFINE_GUID(WiaImgFmt_DPOF,0x369eeeab,0xa0e8,0x45ca,0x86,0xa6,0xa8,0x3c,0xe5,0x69,0x7e,0x28);
  121. //**************************************************************************
  122. //
  123. // Audio types
  124. //
  125. //**************************************************************************
  126. DEFINE_GUID(WiaAudFmt_WAV, 0xf818e146,0x07af,0x40ff,0xae,0x55,0xbe,0x8f,0x2c,0x06,0x5d,0xbe);
  127. DEFINE_GUID(WiaAudFmt_MP3, 0x0fbc71fb,0x43bf,0x49f2,0x91,0x90,0xe6,0xfe,0xcf,0xf3,0x7e,0x54);
  128. DEFINE_GUID(WiaAudFmt_AIFF, 0x66e2bf4f,0xb6fc,0x443f,0x94,0xc8,0x2f,0x33,0xc8,0xa6,0x5a,0xaf);
  129. DEFINE_GUID(WiaAudFmt_WMA, 0xd61d6413,0x8bc2,0x438f,0x93,0xad,0x21,0xbd,0x48,0x4d,0xb6,0xa1);
  130. //**************************************************************************
  131. //
  132. // WIA Events
  133. //
  134. //**************************************************************************
  135. //
  136. // Event registration flags, used by RegisterEventLaunch,
  137. // RegisterEventCallbackInterface and RegisterEventCallbackCLSID.
  138. //
  139. #define  WIA_REGISTER_EVENT_CALLBACK        0x00000001
  140. #define  WIA_UNREGISTER_EVENT_CALLBACK      0x00000002
  141. #define  WIA_SET_DEFAULT_HANDLER            0x00000004
  142. //
  143. // Event type : individual bits of the possible event type combinations
  144. //
  145. #define  WIA_NOTIFICATION_EVENT             0x00000001
  146. #define  WIA_ACTION_EVENT                   0x00000002
  147. //
  148. // Flag to indicate the corresponding persistent handler is default
  149. //
  150. #define  WIA_IS_DEFAULT_HANDLER             0x00000001
  151. //
  152. // Event GUIDs
  153. //
  154. DEFINE_GUID(WIA_EVENT_DEVICE_DISCONNECTED,  0x143e4e83, 0x6497, 0x11d2, 0xa2, 0x31, 0x0, 0xc0, 0x4f, 0xa3, 0x18, 0x9);
  155. DEFINE_GUID(WIA_EVENT_DEVICE_CONNECTED,     0xa28bbade, 0x64b6, 0x11d2, 0xa2, 0x31, 0x0, 0xc0, 0x4f, 0xa3, 0x18, 0x9);
  156. DEFINE_GUID(WIA_EVENT_ITEM_DELETED,         0x1d22a559, 0xe14f, 0x11d2, 0xb3, 0x26, 0x00, 0xc0, 0x4f, 0x68, 0xce, 0x61);
  157. DEFINE_GUID(WIA_EVENT_ITEM_CREATED,         0x4c8f4ef5, 0xe14f, 0x11d2, 0xb3, 0x26, 0x00, 0xc0, 0x4f, 0x68, 0xce, 0x61);
  158. DEFINE_GUID(WIA_EVENT_TREE_UPDATED,         0xc9859b91, 0x4ab2, 0x4cd6, 0xa1, 0xfc, 0x58, 0x2e, 0xec, 0x55, 0xe5, 0x85);
  159. DEFINE_GUID(WIA_EVENT_VOLUME_INSERT,        0x9638bbfd, 0xd1bd, 0x11d2, 0xb3, 0x1f, 0x00, 0xc0, 0x4f, 0x68, 0xce, 0x61);
  160. DEFINE_GUID(WIA_EVENT_SCAN_IMAGE,           0xa6c5a715, 0x8c6e, 0x11d2, 0x97, 0x7a, 0x0, 0x0, 0xf8, 0x7a, 0x92, 0x6f);
  161. DEFINE_GUID(WIA_EVENT_SCAN_PRINT_IMAGE,     0xb441f425, 0x8c6e, 0x11d2, 0x97, 0x7a, 0x0, 0x0, 0xf8, 0x7a, 0x92, 0x6f);
  162. DEFINE_GUID(WIA_EVENT_SCAN_FAX_IMAGE,       0xc00eb793, 0x8c6e, 0x11d2, 0x97, 0x7a, 0x0, 0x0, 0xf8, 0x7a, 0x92, 0x6f);
  163. DEFINE_GUID(WIA_EVENT_SCAN_OCR_IMAGE,       0x9d095b89, 0x37d6, 0x4877, 0xaf, 0xed, 0x62, 0xa2, 0x97, 0xdc, 0x6d, 0xbe);
  164. DEFINE_GUID(WIA_EVENT_SCAN_EMAIL_IMAGE,     0xc686dcee, 0x54f2, 0x419e, 0x9a, 0x27, 0x2f, 0xc7, 0xf2, 0xe9, 0x8f, 0x9e);
  165. DEFINE_GUID(WIA_EVENT_SCAN_FILM_IMAGE,      0x9b2b662c, 0x6185, 0x438c, 0xb6, 0x8b, 0xe3, 0x9e, 0xe2, 0x5e, 0x71, 0xcb);
  166. DEFINE_GUID(WIA_EVENT_SCAN_IMAGE2,          0xfc4767c1, 0xc8b3, 0x48a2, 0x9c, 0xfa, 0x2e, 0x90, 0xcb, 0x3d, 0x35, 0x90);
  167. DEFINE_GUID(WIA_EVENT_SCAN_IMAGE3,          0x154e27be, 0xb617, 0x4653, 0xac, 0xc5, 0xf, 0xd7, 0xbd, 0x4c, 0x65, 0xce);
  168. DEFINE_GUID(WIA_EVENT_SCAN_IMAGE4,          0xa65b704a, 0x7f3c, 0x4447, 0xa7, 0x5d, 0x8a, 0x26, 0xdf, 0xca, 0x1f, 0xdf);
  169. DEFINE_GUID(WIA_EVENT_STORAGE_CREATED,      0x353308b2, 0xfe73, 0x46c8, 0x89, 0x5e, 0xfa, 0x45, 0x51, 0xcc, 0xc8, 0x5a);
  170. DEFINE_GUID(WIA_EVENT_STORAGE_DELETED,      0x5e41e75e, 0x9390, 0x44c5, 0x9a, 0x51, 0xe4, 0x70, 0x19, 0xe3, 0x90, 0xcf);
  171. DEFINE_GUID(WIA_EVENT_STI_PROXY,            0xd711f81f, 0x1f0d, 0x422d, 0x86, 0x41, 0x92, 0x7d, 0x1b, 0x93, 0xe5, 0xe5);
  172. DEFINE_GUID(WIA_EVENT_CANCEL_IO,            0xc860f7b8, 0x9ccd, 0x41ea, 0xbb, 0xbf, 0x4d, 0xd0, 0x9c, 0x5b, 0x17, 0x95);
  173. //
  174. // Power management event GUIDs, sent by the WIA service to drivers
  175. //
  176. DEFINE_GUID(WIA_EVENT_POWER_SUSPEND,    0xa0922ff9, 0xc3b4, 0x411c, 0x9e, 0x29, 0x03, 0xa6, 0x69, 0x93, 0xd2, 0xbe);
  177. DEFINE_GUID(WIA_EVENT_POWER_RESUME,     0x618f153e, 0xf686, 0x4350, 0x96, 0x34, 0x41, 0x15, 0xa3, 0x04, 0x83, 0x0c);
  178. //
  179. // No action handler and prompt handler
  180. //
  181. DEFINE_GUID(WIA_EVENT_HANDLER_NO_ACTION, 0xe0372b7d, 0xe115, 0x4525, 0xbc, 0x55, 0xb6, 0x29, 0xe6, 0x8c, 0x74, 0x5a);
  182. DEFINE_GUID(WIA_EVENT_HANDLER_PROMPT, 0x5f4baad0, 0x4d59, 0x4fcd, 0xb2, 0x13, 0x78, 0x3c, 0xe7, 0xa9, 0x2f, 0x22);
  183. #define WIA_EVENT_DEVICE_DISCONNECTED_STR   L"Device Disconnected"
  184. #define WIA_EVENT_DEVICE_CONNECTED_STR      L"Device Connected"
  185. //**************************************************************************
  186. //
  187. // WIA Commands
  188. //
  189. //**************************************************************************
  190. DEFINE_GUID(WIA_CMD_SYNCHRONIZE, 0x9b26b7b2, 0xacad, 0x11d2, 0xa0, 0x93, 0x00, 0xc0, 0x4f, 0x72, 0xdc, 0x3c);
  191. DEFINE_GUID(WIA_CMD_TAKE_PICTURE, 0xaf933cac, 0xacad, 0x11d2, 0xa0, 0x93, 0x00, 0xc0, 0x4f, 0x72, 0xdc, 0x3c);
  192. DEFINE_GUID(WIA_CMD_DELETE_ALL_ITEMS, 0xe208c170, 0xacad, 0x11d2, 0xa0, 0x93, 0x00, 0xc0, 0x4f, 0x72, 0xdc, 0x3c);
  193. DEFINE_GUID(WIA_CMD_CHANGE_DOCUMENT, 0x04e725b0, 0xacae, 0x11d2, 0xa0, 0x93, 0x00, 0xc0, 0x4f, 0x72, 0xdc, 0x3c);
  194. DEFINE_GUID(WIA_CMD_UNLOAD_DOCUMENT, 0x1f3b3d8e, 0xacae, 0x11d2, 0xa0, 0x93, 0x00, 0xc0, 0x4f, 0x72, 0xdc, 0x3c);
  195. DEFINE_GUID(WIA_CMD_DIAGNOSTIC, 0x10ff52f5, 0xde04, 0x4cf0, 0xa5, 0xad, 0x69, 0x1f, 0x8d, 0xce, 0x01, 0x41);
  196. //
  197. // The following are private commands for debugging use only.
  198. //
  199. DEFINE_GUID(WIA_CMD_DELETE_DEVICE_TREE, 0x73815942, 0xdbea, 0x11d2, 0x84, 0x16, 0x00, 0xc0, 0x4f, 0xa3, 0x61, 0x45);
  200. DEFINE_GUID(WIA_CMD_BUILD_DEVICE_TREE, 0x9cba5ce0, 0xdbea, 0x11d2, 0x84, 0x16, 0x00, 0xc0, 0x4f, 0xa3, 0x61, 0x45);
  201. //**************************************************************************
  202. //
  203. // WIA Icons
  204. //
  205. //   Event   : -1000 to -1499 (Standard), -1500 to -1999 (Custom)
  206. //   Command : -2000 to -2499 (Standard), -2500 to -2999 (Custom)
  207. //
  208. //**************************************************************************
  209. #define WIA_ICON_DEVICE_DISCONNECTED    (L"sti.dll,-1001")
  210. #define WIA_ICON_DEVICE_CONNECTED       (L"sti.dll,-1001")
  211. #define WIA_ICON_ITEM_DELETED           (L"sti.dll,-1001")
  212. #define WIA_ICON_ITEM_CREATED           (L"sti.dll,-1001")
  213. #define WIA_ICON_VOLUME_INSERT          (L"sti.dll,-1001")
  214. #define WIA_ICON_SCAN_BUTTON_PRESS      (L"sti.dll,-1001")
  215. #define WIA_ICON_SYNCHRONIZE            (L"sti.dll,-2000")
  216. #define WIA_ICON_TAKE_PICTURE           (L"sti.dll,-2001")
  217. #define WIA_ICON_DELETE_ALL_ITEMS       (L"sti.dll,-2002")
  218. #define WIA_ICON_CHANGE_DOCUMENT        (L"sti.dll,-2003")
  219. #define WIA_ICON_UNLOAD_DOCUMENT        (L"sti.dll,-2004")
  220. #define WIA_ICON_DELETE_DEVICE_TREE     (L"sti.dll,-2005")
  221. #define WIA_ICON_BUILD_DEVICE_TREE      (L"sti.dll,-2006")
  222. //**************************************************************************
  223. //
  224. // WIA Callbacks
  225. //
  226. //**************************************************************************
  227. //
  228. // IImageTransfer TYMED
  229. //
  230. #define TYMED_CALLBACK                          128
  231. #define TYMED_MULTIPAGE_FILE                    256
  232. #define TYMED_MULTIPAGE_CALLBACK                512
  233. //
  234. // IImageTransfer Callback Status. Messages must be a single value
  235. //
  236. #define IT_MSG_DATA_HEADER                      0x0001
  237. #define IT_MSG_DATA                             0x0002
  238. #define IT_MSG_STATUS                           0x0003
  239. #define IT_MSG_TERMINATION                      0x0004
  240. #define IT_MSG_NEW_PAGE                         0x0005
  241. #define IT_MSG_FILE_PREVIEW_DATA                0x0006
  242. #define IT_MSG_FILE_PREVIEW_DATA_HEADER         0x0007
  243. //
  244. //  Flags may be bit field combinations
  245. //
  246. #define IT_STATUS_TRANSFER_FROM_DEVICE          0x0001
  247. #define IT_STATUS_PROCESSING_DATA               0x0002
  248. #define IT_STATUS_TRANSFER_TO_CLIENT            0x0004
  249. //
  250. // IWIAEventCallback codes
  251. //
  252. #define WIA_MAJOR_EVENT_DEVICE_CONNECT          0x01
  253. #define WIA_MAJOR_EVENT_DEVICE_DISCONNECT       0x02
  254. #define WIA_MAJOR_EVENT_PICTURE_TAKEN           0x03
  255. #define WIA_MAJOR_EVENT_PICTURE_DELETED         0x04
  256. //
  257. // Device connection status
  258. //
  259. #define  WIA_DEVICE_NOT_CONNECTED               0
  260. #define  WIA_DEVICE_CONNECTED                   1
  261. //**************************************************************************
  262. //
  263. // WIA Enumeration Flags
  264. //
  265. //**************************************************************************
  266. //
  267. // EnumDeviceCapabilities flags
  268. //
  269. #define WIA_DEVICE_COMMANDS 1
  270. #define WIA_DEVICE_EVENTS 2
  271. //
  272. // EnumDeviceInfo Flags
  273. //
  274. #define WIA_DEVINFO_ENUM_LOCAL                  0x00000010
  275. //**************************************************************************
  276. //
  277. // WIA Item constants
  278. //
  279. //**************************************************************************
  280. //
  281. // Item Types
  282. //
  283. #define WiaItemTypeFree                         0x00000000
  284. #define WiaItemTypeImage                        0x00000001
  285. #define WiaItemTypeFile                         0x00000002
  286. #define WiaItemTypeFolder                       0x00000004
  287. #define WiaItemTypeRoot                         0x00000008
  288. #define WiaItemTypeAnalyze                      0x00000010
  289. #define WiaItemTypeAudio                        0x00000020
  290. #define WiaItemTypeDevice                       0x00000040
  291. #define WiaItemTypeDeleted                      0x00000080
  292. #define WiaItemTypeDisconnected                 0x00000100
  293. #define WiaItemTypeHPanorama                    0x00000200
  294. #define WiaItemTypeVPanorama                    0x00000400
  295. #define WiaItemTypeBurst                        0x00000800
  296. #define WiaItemTypeStorage                      0x00001000
  297. #define WiaItemTypeTransfer                     0x00002000
  298. #define WiaItemTypeGenerated                    0x00004000
  299. #define WiaItemTypeHasAttachments               0x00008000
  300. #define WiaItemTypeVideo                        0x00010000
  301. //
  302. // 0x00020000 has been reserved for the TWAIN compatiblity layer
  303. // pass-through feature.
  304. //
  305. #define WiaItemTypeRemoved                      0x80000000
  306. #define WiaItemTypeMask                         0x8003FFFF
  307. //
  308. // Big max device specific item context
  309. //
  310. #define WIA_MAX_CTX_SIZE                        0x01000000
  311. //**************************************************************************
  312. //
  313. // WIA Properties
  314. //
  315. //**************************************************************************
  316. //
  317. // Property access flags
  318. //
  319. #define WIA_PROP_READ            0x01
  320. #define WIA_PROP_WRITE           0x02
  321. #define WIA_PROP_RW              (WIA_PROP_READ | WIA_PROP_WRITE)
  322. #define WIA_PROP_SYNC_REQUIRED   0x04
  323. #define WIA_PROP_NONE            0x08
  324. #define WIA_PROP_RANGE           0x10
  325. #define WIA_PROP_LIST            0x20
  326. #define WIA_PROP_FLAG            0x40
  327. #define WIA_PROP_CACHEABLE       0x10000
  328. //
  329. // Item access flags
  330. //
  331. #define WIA_ITEM_CAN_BE_DELETED  0x80
  332. #define WIA_ITEM_READ            WIA_PROP_READ
  333. #define WIA_ITEM_WRITE           WIA_PROP_WRITE
  334. #define WIA_ITEM_RD              (WIA_ITEM_READ | WIA_ITEM_CAN_BE_DELETED)
  335. #define WIA_ITEM_RWD             (WIA_ITEM_READ | WIA_ITEM_WRITE | WIA_ITEM_CAN_BE_DELETED)
  336. #ifndef __WIAPROP_H_INCLUDED
  337. #define __WIAPROP_H_INCLUDED
  338. //
  339. // Device information properties
  340. //
  341. #define WIA_RESERVED_FOR_SMALL_NEW_PROPS        256
  342. #define WIA_RESERVED_FOR_NEW_PROPS              1024
  343. #define WIA_RESERVED_FOR_ALL_MS_PROPS           (1024*32)
  344. #define WIA_DIP_FIRST                           2
  345. #define WIA_DIP_DEV_ID                          2
  346. #define WIA_DIP_VEND_DESC                       3
  347. #define WIA_DIP_DEV_DESC                        4
  348. #define WIA_DIP_DEV_TYPE                        5
  349. #define WIA_DIP_PORT_NAME                       6
  350. #define WIA_DIP_DEV_NAME                        7
  351. #define WIA_DIP_SERVER_NAME                     8
  352. #define WIA_DIP_REMOTE_DEV_ID                   9
  353. #define WIA_DIP_UI_CLSID                        10
  354. #define WIA_DIP_HW_CONFIG                       11
  355. #define WIA_DIP_BAUDRATE                        12
  356. #define WIA_DIP_STI_GEN_CAPABILITIES            13
  357. #define WIA_DIP_WIA_VERSION                     14
  358. #define WIA_DIP_DRIVER_VERSION                  15
  359. #define WIA_DIP_LAST                            15
  360. #define WIA_NUM_DIP          1 + WIA_DIP_LAST - WIA_DIP_FIRST
  361. #define WIA_DIP_DEV_ID_STR                      L"Unique Device ID"
  362. #define WIA_DIP_VEND_DESC_STR                   L"Manufacturer"
  363. #define WIA_DIP_DEV_DESC_STR                    L"Description"
  364. #define WIA_DIP_DEV_TYPE_STR                    L"Type"
  365. #define WIA_DIP_PORT_NAME_STR                   L"Port"
  366. #define WIA_DIP_DEV_NAME_STR                    L"Name"
  367. #define WIA_DIP_SERVER_NAME_STR                 L"Server"
  368. #define WIA_DIP_REMOTE_DEV_ID_STR               L"Remote Device ID"
  369. #define WIA_DIP_UI_CLSID_STR                    L"UI Class ID"
  370. #define WIA_DIP_HW_CONFIG_STR                   L"Hardware Configuration"
  371. #define WIA_DIP_BAUDRATE_STR                    L"BaudRate"
  372. #define WIA_DIP_STI_GEN_CAPABILITIES_STR        L"STI Generic Capabilities"
  373. #define WIA_DIP_WIA_VERSION_STR                 L"WIA Version"
  374. #define WIA_DIP_DRIVER_VERSION_STR              L"Driver Version"
  375. //
  376. // Constant arrays for device information property init
  377. //
  378. #ifdef WIA_DECLARE_DEVINFO_PROP_ARRAY
  379. PROPSPEC g_psDeviceInfo[WIA_NUM_DIP] =
  380. {
  381.     {PRSPEC_PROPID, WIA_DIP_DEV_ID},
  382.     {PRSPEC_PROPID, WIA_DIP_VEND_DESC},
  383.     {PRSPEC_PROPID, WIA_DIP_DEV_DESC},
  384.     {PRSPEC_PROPID, WIA_DIP_DEV_TYPE},
  385.     {PRSPEC_PROPID, WIA_DIP_PORT_NAME},
  386.     {PRSPEC_PROPID, WIA_DIP_DEV_NAME},
  387.     {PRSPEC_PROPID, WIA_DIP_SERVER_NAME},
  388.     {PRSPEC_PROPID, WIA_DIP_REMOTE_DEV_ID},
  389.     {PRSPEC_PROPID, WIA_DIP_UI_CLSID},
  390.     {PRSPEC_PROPID, WIA_DIP_HW_CONFIG},
  391.     {PRSPEC_PROPID, WIA_DIP_BAUDRATE},
  392.     {PRSPEC_PROPID, WIA_DIP_STI_GEN_CAPABILITIES},
  393.     {PRSPEC_PROPID, WIA_DIP_WIA_VERSION},
  394.     {PRSPEC_PROPID, WIA_DIP_DRIVER_VERSION},
  395. };
  396. PROPID g_piDeviceInfo[WIA_NUM_DIP] =
  397. {
  398.     WIA_DIP_DEV_ID,
  399.     WIA_DIP_VEND_DESC,
  400.     WIA_DIP_DEV_DESC,
  401.     WIA_DIP_DEV_TYPE,
  402.     WIA_DIP_PORT_NAME,
  403.     WIA_DIP_DEV_NAME,
  404.     WIA_DIP_SERVER_NAME,
  405.     WIA_DIP_REMOTE_DEV_ID,
  406.     WIA_DIP_UI_CLSID,
  407.     WIA_DIP_HW_CONFIG,
  408.     WIA_DIP_BAUDRATE,
  409.     WIA_DIP_STI_GEN_CAPABILITIES,
  410.     WIA_DIP_WIA_VERSION,
  411.     WIA_DIP_DRIVER_VERSION,
  412. };
  413. LPOLESTR g_pszDeviceInfo[WIA_NUM_DIP] =
  414. {
  415.     WIA_DIP_DEV_ID_STR,
  416.     WIA_DIP_VEND_DESC_STR,
  417.     WIA_DIP_DEV_DESC_STR,
  418.     WIA_DIP_DEV_TYPE_STR,
  419.     WIA_DIP_PORT_NAME_STR,
  420.     WIA_DIP_DEV_NAME_STR,
  421.     WIA_DIP_SERVER_NAME_STR,
  422.     WIA_DIP_REMOTE_DEV_ID_STR,
  423.     WIA_DIP_UI_CLSID_STR,
  424.     WIA_DIP_HW_CONFIG_STR,
  425.     WIA_DIP_BAUDRATE_STR,
  426.     WIA_DIP_STI_GEN_CAPABILITIES_STR,
  427.     WIA_DIP_WIA_VERSION_STR,
  428.     WIA_DIP_DRIVER_VERSION_STR,
  429. };
  430. #else
  431. extern PROPSPEC             g_psDeviceInfo[WIA_NUM_DIP];
  432. extern PROPID               g_piDeviceInfo[WIA_NUM_DIP];
  433. extern LPOLESTR             g_pszDeviceInfo[WIA_NUM_DIP];
  434. #endif
  435. //
  436. // Common device properties
  437. //
  438. #define WIA_DPA_FIRST                           WIA_DIP_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  439. #define WIA_DPA_FIRMWARE_VERSION                WIA_DPA_FIRST + 0
  440. #define WIA_DPA_CONNECT_STATUS                  WIA_DPA_FIRST + 1
  441. #define WIA_DPA_DEVICE_TIME                     WIA_DPA_FIRST + 2
  442. #define WIA_DPA_LAST                            WIA_DPA_FIRST + 3
  443. #define WIA_DPA_FIRMWARE_VERSION_STR            L"Firmware Version"
  444. #define WIA_DPA_CONNECT_STATUS_STR              L"Connect Status"
  445. #define WIA_DPA_DEVICE_TIME_STR                 L"Device Time"
  446. #define WIA_NUM_DPA (1 + WIA_DPA_LAST - WIA_DPA_FIRST)
  447. //
  448. // Camera device properties
  449. //
  450. #define WIA_DPC_FIRST                           WIA_DPA_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  451. #define WIA_DPC_PICTURES_TAKEN                  WIA_DPC_FIRST + 0
  452. #define WIA_DPC_PICTURES_REMAINING              WIA_DPC_FIRST + 1
  453. #define WIA_DPC_EXPOSURE_MODE                   WIA_DPC_FIRST + 2
  454. #define WIA_DPC_EXPOSURE_COMP                   WIA_DPC_FIRST + 3
  455. #define WIA_DPC_EXPOSURE_TIME                   WIA_DPC_FIRST + 4
  456. #define WIA_DPC_FNUMBER                         WIA_DPC_FIRST + 5
  457. #define WIA_DPC_FLASH_MODE                      WIA_DPC_FIRST + 6
  458. #define WIA_DPC_FOCUS_MODE                      WIA_DPC_FIRST + 7
  459. #define WIA_DPC_FOCUS_MANUAL_DIST               WIA_DPC_FIRST + 8
  460. #define WIA_DPC_ZOOM_POSITION                   WIA_DPC_FIRST + 9
  461. #define WIA_DPC_PAN_POSITION                    WIA_DPC_FIRST + 10
  462. #define WIA_DPC_TILT_POSITION                   WIA_DPC_FIRST + 11
  463. #define WIA_DPC_TIMER_MODE                      WIA_DPC_FIRST + 12
  464. #define WIA_DPC_TIMER_VALUE                     WIA_DPC_FIRST + 13
  465. #define WIA_DPC_POWER_MODE                      WIA_DPC_FIRST + 14
  466. #define WIA_DPC_BATTERY_STATUS                  WIA_DPC_FIRST + 15
  467. #define WIA_DPC_THUMB_WIDTH                     WIA_DPC_FIRST + 16
  468. #define WIA_DPC_THUMB_HEIGHT                    WIA_DPC_FIRST + 17
  469. #define WIA_DPC_PICT_WIDTH                      WIA_DPC_FIRST + 18
  470. #define WIA_DPC_PICT_HEIGHT                     WIA_DPC_FIRST + 19
  471. #define WIA_DPC_DIMENSION                       WIA_DPC_FIRST + 20
  472. #define WIA_DPC_COMPRESSION_SETTING             WIA_DPC_FIRST + 21
  473. #define WIA_DPC_FOCUS_METERING                  WIA_DPC_FIRST + 22
  474. #define WIA_DPC_TIMELAPSE_INTERVAL              WIA_DPC_FIRST + 23
  475. #define WIA_DPC_TIMELAPSE_NUMBER                WIA_DPC_FIRST + 24
  476. #define WIA_DPC_BURST_INTERVAL                  WIA_DPC_FIRST + 25
  477. #define WIA_DPC_BURST_NUMBER                    WIA_DPC_FIRST + 26
  478. #define WIA_DPC_EFFECT_MODE                     WIA_DPC_FIRST + 27
  479. #define WIA_DPC_DIGITAL_ZOOM                    WIA_DPC_FIRST + 28
  480. #define WIA_DPC_SHARPNESS                       WIA_DPC_FIRST + 29
  481. #define WIA_DPC_CONTRAST                        WIA_DPC_FIRST + 30
  482. #define WIA_DPC_CAPTURE_MODE                    WIA_DPC_FIRST + 31
  483. #define WIA_DPC_CAPTURE_DELAY                   WIA_DPC_FIRST + 32
  484. #define WIA_DPC_EXPOSURE_INDEX                  WIA_DPC_FIRST + 33
  485. #define WIA_DPC_EXPOSURE_METERING_MODE          WIA_DPC_FIRST + 34
  486. #define WIA_DPC_FOCUS_METERING_MODE             WIA_DPC_FIRST + 35
  487. #define WIA_DPC_FOCUS_DISTANCE                  WIA_DPC_FIRST + 36
  488. #define WIA_DPC_FOCAL_LENGTH                    WIA_DPC_FIRST + 37
  489. #define WIA_DPC_RGB_GAIN                        WIA_DPC_FIRST + 38
  490. #define WIA_DPC_WHITE_BALANCE                   WIA_DPC_FIRST + 39
  491. #define WIA_DPC_UPLOAD_URL                      WIA_DPC_FIRST + 40
  492. #define WIA_DPC_ARTIST                          WIA_DPC_FIRST + 41
  493. #define WIA_DPC_COPYRIGHT_INFO                  WIA_DPC_FIRST + 42
  494. #define WIA_DPC_LAST                            WIA_DPC_FIRST + 42
  495. #define WIA_DPC_PICTURES_TAKEN_STR              L"Pictures Taken"
  496. #define WIA_DPC_PICTURES_REMAINING_STR          L"Pictures Remaining"
  497. #define WIA_DPC_EXPOSURE_MODE_STR               L"Exposure Mode"
  498. #define WIA_DPC_EXPOSURE_COMP_STR               L"Exposure Compensation"
  499. #define WIA_DPC_EXPOSURE_TIME_STR               L"Exposure Time"
  500. #define WIA_DPC_FNUMBER_STR                     L"F Number"
  501. #define WIA_DPC_FLASH_MODE_STR                  L"Flash Mode"
  502. #define WIA_DPC_FOCUS_MODE_STR                  L"Focus Mode"
  503. #define WIA_DPC_FOCUS_MANUAL_DIST_STR           L"Focus Manual Dist"
  504. #define WIA_DPC_ZOOM_POSITION_STR               L"Zoom Position"
  505. #define WIA_DPC_PAN_POSITION_STR                L"Pan Position"
  506. #define WIA_DPC_TILT_POSITION_STR               L"Tilt Position"
  507. #define WIA_DPC_TIMER_MODE_STR                  L"Timer Mode"
  508. #define WIA_DPC_TIMER_VALUE_STR                 L"Timer Value"
  509. #define WIA_DPC_POWER_MODE_STR                  L"Power Mode"
  510. #define WIA_DPC_BATTERY_STATUS_STR              L"Battery Status"
  511. #define WIA_DPC_THUMB_WIDTH_STR                 L"Thumbnail Width"
  512. #define WIA_DPC_THUMB_HEIGHT_STR                L"Thumbnail Height"
  513. #define WIA_DPC_PICT_WIDTH_STR                  L"Picture Width"
  514. #define WIA_DPC_PICT_HEIGHT_STR                 L"Picture Height"
  515. #define WIA_DPC_DIMENSION_STR                   L"Dimension"
  516. #define WIA_DPC_COMPRESSION_SETTING_STR         L"Compression Setting"
  517. #define WIA_DPC_FOCUS_METERING_MODE_STR         L"Focus Metering Mode"
  518. #define WIA_DPC_TIMELAPSE_INTERVAL_STR          L"Timelapse Interval"
  519. #define WIA_DPC_TIMELAPSE_NUMBER_STR            L"Timelapse Number"
  520. #define WIA_DPC_BURST_INTERVAL_STR              L"Burst Interval"
  521. #define WIA_DPC_BURST_NUMBER_STR                L"Burst Number"
  522. #define WIA_DPC_EFFECT_MODE_STR                 L"Effect Mode"
  523. #define WIA_DPC_DIGITAL_ZOOM_STR                L"Digital Zoom"
  524. #define WIA_DPC_SHARPNESS_STR                   L"Sharpness"
  525. #define WIA_DPC_CONTRAST_STR                    L"Contrast"
  526. #define WIA_DPC_CAPTURE_MODE_STR                L"Capture Mode"
  527. #define WIA_DPC_CAPTURE_DELAY_STR               L"Capture Delay"
  528. #define WIA_DPC_EXPOSURE_INDEX_STR              L"Exposure Index"
  529. #define WIA_DPC_EXPOSURE_METERING_MODE_STR      L"Exposure Metering Mode"
  530. #define WIA_DPC_FOCUS_DISTANCE_STR              L"Focus Distance"
  531. #define WIA_DPC_FOCAL_LENGTH_STR                L"Focus Length"
  532. #define WIA_DPC_RGB_GAIN_STR                    L"RGB Gain"
  533. #define WIA_DPC_WHITE_BALANCE_STR               L"White Balance"
  534. #define WIA_DPC_UPLOAD_URL_STR                  L"Upload URL"
  535. #define WIA_DPC_ARTIST_STR                      L"Artist"
  536. #define WIA_DPC_COPYRIGHT_INFO_STR              L"Copyright Info"
  537. #define WIA_NUM_DPC (1 + WIA_DPC_LAST - WIA_DPC_FIRST)
  538. //
  539. // Scanner device properties
  540. //
  541. #define WIA_DPS_FIRST                                  WIA_DPC_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  542. #define WIA_DPS_HORIZONTAL_BED_SIZE                    WIA_DPS_FIRST + 0
  543. #define WIA_DPS_VERTICAL_BED_SIZE                      WIA_DPS_FIRST + 1
  544. #define WIA_DPS_HORIZONTAL_SHEET_FEED_SIZE             WIA_DPS_FIRST + 2
  545. #define WIA_DPS_VERTICAL_SHEET_FEED_SIZE               WIA_DPS_FIRST + 3
  546. #define WIA_DPS_SHEET_FEEDER_REGISTRATION              WIA_DPS_FIRST + 4
  547. #define WIA_DPS_HORIZONTAL_BED_REGISTRATION            WIA_DPS_FIRST + 5
  548. #define WIA_DPS_VERTICAL_BED_REGISTRATION              WIA_DPS_FIRST + 6
  549. #define WIA_DPS_PLATEN_COLOR                           WIA_DPS_FIRST + 7
  550. #define WIA_DPS_PAD_COLOR                              WIA_DPS_FIRST + 8
  551. #define WIA_DPS_FILTER_SELECT                          WIA_DPS_FIRST + 9
  552. #define WIA_DPS_DITHER_SELECT                          WIA_DPS_FIRST + 10
  553. #define WIA_DPS_DITHER_PATTERN_DATA                    WIA_DPS_FIRST + 11
  554. #define WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES         WIA_DPS_FIRST + 12
  555. #define WIA_DPS_DOCUMENT_HANDLING_STATUS               WIA_DPS_FIRST + 13
  556. #define WIA_DPS_DOCUMENT_HANDLING_SELECT               WIA_DPS_FIRST + 14
  557. #define WIA_DPS_DOCUMENT_HANDLING_CAPACITY             WIA_DPS_FIRST + 15
  558. #define WIA_DPS_OPTICAL_XRES                           WIA_DPS_FIRST + 16
  559. #define WIA_DPS_OPTICAL_YRES                           WIA_DPS_FIRST + 17
  560. #define WIA_DPS_ENDORSER_CHARACTERS                    WIA_DPS_FIRST + 18
  561. #define WIA_DPS_ENDORSER_STRING                        WIA_DPS_FIRST + 19
  562. #define WIA_DPS_SCAN_AHEAD_PAGES                       WIA_DPS_FIRST + 20
  563. #define WIA_DPS_MAX_SCAN_TIME                          WIA_DPS_FIRST + 21
  564. #define WIA_DPS_PAGES                                  WIA_DPS_FIRST + 22
  565. #define WIA_DPS_PAGE_SIZE                              WIA_DPS_FIRST + 23
  566. #define WIA_DPS_PAGE_WIDTH                             WIA_DPS_FIRST + 24
  567. #define WIA_DPS_PAGE_HEIGHT                            WIA_DPS_FIRST + 25
  568. #define WIA_DPS_PREVIEW                                WIA_DPS_FIRST + 26
  569. #define WIA_DPS_TRANSPARENCY                           WIA_DPS_FIRST + 27
  570. #define WIA_DPS_TRANSPARENCY_SELECT                    WIA_DPS_FIRST + 28
  571. #define WIA_DPS_SHOW_PREVIEW_CONTROL                   WIA_DPS_FIRST + 29
  572. #define WIA_DPS_MIN_HORIZONTAL_SHEET_FEED_SIZE         WIA_DPS_FIRST + 30
  573. #define WIA_DPS_MIN_VERTICAL_SHEET_FEED_SIZE           WIA_DPS_FIRST + 31
  574. #define WIA_DPS_LAST                                   WIA_DPS_FIRST + 31
  575. #define WIA_DPS_HORIZONTAL_BED_SIZE_STR                L"Horizontal Bed Size"
  576. #define WIA_DPS_VERTICAL_BED_SIZE_STR                  L"Vertical Bed Size"
  577. #define WIA_DPS_HORIZONTAL_SHEET_FEED_SIZE_STR         L"Horizontal Sheet Feed Size"
  578. #define WIA_DPS_VERTICAL_SHEET_FEED_SIZE_STR           L"Vertical Sheet Feed Size"
  579. #define WIA_DPS_SHEET_FEEDER_REGISTRATION_STR          L"Sheet Feeder Registration"
  580. #define WIA_DPS_HORIZONTAL_BED_REGISTRATION_STR        L"Horizontal Bed Registration"
  581. #define WIA_DPS_VERTICAL_BED_REGISTRATION_STR          L"Vertical Bed Registration"
  582. #define WIA_DPS_PLATEN_COLOR_STR                       L"Platen Color"
  583. #define WIA_DPS_PAD_COLOR_STR                          L"Pad Color"
  584. #define WIA_DPS_FILTER_SELECT_STR                      L"Filter Select"
  585. #define WIA_DPS_DITHER_SELECT_STR                      L"Dither Select"
  586. #define WIA_DPS_DITHER_PATTERN_DATA_STR                L"Dither Pattern Data"
  587. #define WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES_STR     L"Document Handling Capabilities"
  588. #define WIA_DPS_DOCUMENT_HANDLING_STATUS_STR           L"Document Handling Status"
  589. #define WIA_DPS_DOCUMENT_HANDLING_SELECT_STR           L"Document Handling Select"
  590. #define WIA_DPS_DOCUMENT_HANDLING_CAPACITY_STR         L"Document Handling Capacity"
  591. #define WIA_DPS_OPTICAL_XRES_STR                       L"Horizontal Optical Resolution"
  592. #define WIA_DPS_OPTICAL_YRES_STR                       L"Vertical Optical Resolution"
  593. #define WIA_DPS_ENDORSER_CHARACTERS_STR                L"Endorser Characters"
  594. #define WIA_DPS_ENDORSER_STRING_STR                    L"Endorser String"
  595. #define WIA_DPS_SCAN_AHEAD_PAGES_STR                   L"Scan Ahead Pages"
  596. #define WIA_DPS_MAX_SCAN_TIME_STR                      L"Max Scan Time"
  597. #define WIA_DPS_PAGES_STR                              L"Pages"
  598. #define WIA_DPS_PAGE_SIZE_STR                          L"Page Size"
  599. #define WIA_DPS_PAGE_WIDTH_STR                         L"Page Width"
  600. #define WIA_DPS_PAGE_HEIGHT_STR                        L"Page Height"
  601. #define WIA_DPS_PREVIEW_STR                            L"Preview"
  602. #define WIA_DPS_TRANSPARENCY_STR                       L"Transparency Adapter"
  603. #define WIA_DPS_TRANSPARENCY_SELECT_STR                L"Transparency Adapter Select"
  604. #define WIA_DPS_SHOW_PREVIEW_CONTROL_STR               L"Show preview control"
  605. #define WIA_DPS_MIN_HORIZONTAL_SHEET_FEED_SIZE_STR     L"Minimum Horizontal Sheet Feed Size"
  606. #define WIA_DPS_MIN_VERTICAL_SHEET_FEED_SIZE_STR       L"Minimum Vertical Sheet Feed Size"
  607. #define WIA_NUM_DPS (1 + WIA_DPS_LAST - WIA_DPS_FIRST)
  608. //
  609. // File System Properties
  610. //
  611. #define WIA_DPF_FIRST                           WIA_DPS_FIRST + WIA_RESERVED_FOR_SMALL_NEW_PROPS
  612. #define WIA_DPF_MOUNT_POINT                     WIA_DPF_FIRST + 0
  613. #define WIA_DPF_LAST                            WIA_DPF_FIRST + 0
  614. #define WIA_DPF_MOUNT_POINT_STR                 L"Directory mount point"
  615. #define WIA_NUM_DPF (1 + WIA_DPF_LAST - WIA_DPF_FIRST)
  616. //
  617. // Video Camera properties.
  618. //
  619. //
  620. #define WIA_DPV_FIRST                           WIA_DPF_FIRST + WIA_RESERVED_FOR_SMALL_NEW_PROPS
  621. #define WIA_DPV_LAST_PICTURE_TAKEN              WIA_DPV_FIRST + 0
  622. #define WIA_DPV_IMAGES_DIRECTORY                WIA_DPV_FIRST + 1
  623. #define WIA_DPV_DSHOW_DEVICE_PATH               WIA_DPV_FIRST + 2
  624. #define WIA_DPV_LAST                            WIA_DPV_FIRST + 2
  625. #define WIA_DPV_LAST_PICTURE_TAKEN_STR          L"Last Picture Taken"
  626. #define WIA_DPV_IMAGES_DIRECTORY_STR            L"Images Directory"
  627. #define WIA_DPV_DSHOW_DEVICE_PATH_STR           L"Directshow Device Path"
  628. #define WIA_NUM_DPV (1 + WIA_DPV_LAST - WIA_DPV_FIRST)
  629. //
  630. // Common item properties
  631. //
  632. #define WIA_IPA_FIRST                           WIA_DPS_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  633. #define WIA_IPA_ITEM_NAME                       WIA_IPA_FIRST + 0
  634. #define WIA_IPA_FULL_ITEM_NAME                  WIA_IPA_FIRST + 1
  635. #define WIA_IPA_ITEM_TIME                       WIA_IPA_FIRST + 2
  636. #define WIA_IPA_ITEM_FLAGS                      WIA_IPA_FIRST + 3
  637. #define WIA_IPA_ACCESS_RIGHTS                   WIA_IPA_FIRST + 4
  638. #define WIA_IPA_DATATYPE                        WIA_IPA_FIRST + 5
  639. #define WIA_IPA_DEPTH                           WIA_IPA_FIRST + 6
  640. #define WIA_IPA_PREFERRED_FORMAT                WIA_IPA_FIRST + 7
  641. #define WIA_IPA_FORMAT                          WIA_IPA_FIRST + 8
  642. #define WIA_IPA_COMPRESSION                     WIA_IPA_FIRST + 9
  643. #define WIA_IPA_TYMED                           WIA_IPA_FIRST + 10
  644. #define WIA_IPA_CHANNELS_PER_PIXEL              WIA_IPA_FIRST + 11
  645. #define WIA_IPA_BITS_PER_CHANNEL                WIA_IPA_FIRST + 12
  646. #define WIA_IPA_PLANAR                          WIA_IPA_FIRST + 13
  647. #define WIA_IPA_PIXELS_PER_LINE                 WIA_IPA_FIRST + 14
  648. #define WIA_IPA_BYTES_PER_LINE                  WIA_IPA_FIRST + 15
  649. #define WIA_IPA_NUMBER_OF_LINES                 WIA_IPA_FIRST + 16
  650. #define WIA_IPA_GAMMA_CURVES                    WIA_IPA_FIRST + 17
  651. #define WIA_IPA_ITEM_SIZE                       WIA_IPA_FIRST + 18
  652. #define WIA_IPA_COLOR_PROFILE                   WIA_IPA_FIRST + 19
  653. #define WIA_IPA_MIN_BUFFER_SIZE                 WIA_IPA_FIRST + 20
  654. // Note:  BUFFER_SIZE and MIN_BUFFER_SIZE have the same propids
  655. #define WIA_IPA_BUFFER_SIZE                     WIA_IPA_FIRST + 20
  656. #define WIA_IPA_REGION_TYPE                     WIA_IPA_FIRST + 21
  657. #define WIA_IPA_ICM_PROFILE_NAME                WIA_IPA_FIRST + 22
  658. #define WIA_IPA_APP_COLOR_MAPPING               WIA_IPA_FIRST + 23
  659. #define WIA_IPA_PROP_STREAM_COMPAT_ID           WIA_IPA_FIRST + 24
  660. #define WIA_IPA_FILENAME_EXTENSION              WIA_IPA_FIRST + 25
  661. #define WIA_IPA_SUPPRESS_PROPERTY_PAGE          WIA_IPA_FIRST + 26
  662. #define WIA_IPA_LAST                            WIA_IPA_FIRST + 26
  663. #define  WIA_IPA_ITEM_NAME_STR                  L"Item Name"
  664. #define  WIA_IPA_FULL_ITEM_NAME_STR             L"Full Item Name"
  665. #define  WIA_IPA_ITEM_TIME_STR                  L"Item Time Stamp"
  666. #define  WIA_IPA_ITEM_FLAGS_STR                 L"Item Flags"
  667. #define  WIA_IPA_ACCESS_RIGHTS_STR              L"Access Rights"
  668. #define  WIA_IPA_DATATYPE_STR                   L"Data Type"
  669. #define  WIA_IPA_DEPTH_STR                      L"Bits Per Pixel"
  670. #define  WIA_IPA_PREFERRED_FORMAT_STR           L"Preferred Format"
  671. #define  WIA_IPA_FORMAT_STR                     L"Format"
  672. #define  WIA_IPA_COMPRESSION_STR                L"Compression"
  673. #define  WIA_IPA_TYMED_STR                      L"Media Type"
  674. #define  WIA_IPA_CHANNELS_PER_PIXEL_STR         L"Channels Per Pixel"
  675. #define  WIA_IPA_BITS_PER_CHANNEL_STR           L"Bits Per Channel"
  676. #define  WIA_IPA_PLANAR_STR                     L"Planar"
  677. #define  WIA_IPA_PIXELS_PER_LINE_STR            L"Pixels Per Line"
  678. #define  WIA_IPA_BYTES_PER_LINE_STR             L"Bytes Per Line"
  679. #define  WIA_IPA_NUMBER_OF_LINES_STR            L"Number of Lines"
  680. #define  WIA_IPA_GAMMA_CURVES_STR               L"Gamma Curves"
  681. #define  WIA_IPA_ITEM_SIZE_STR                  L"Item Size"
  682. #define  WIA_IPA_COLOR_PROFILE_STR              L"Color Profiles"
  683. #define  WIA_IPA_MIN_BUFFER_SIZE_STR            L"Buffer Size"
  684. #define  WIA_IPA_REGION_TYPE_STR                L"Region Type"
  685. #define  WIA_IPA_ICM_PROFILE_NAME_STR           L"Color Profile Name"
  686. #define  WIA_IPA_APP_COLOR_MAPPING_STR          L"Application Applies Color Mapping"
  687. #define  WIA_IPA_PROP_STREAM_COMPAT_ID_STR      L"Stream Compatibility ID"
  688. #define  WIA_IPA_FILENAME_EXTENSION_STR         L"Filename extension"
  689. #define  WIA_IPA_SUPPRESS_PROPERTY_PAGE_STR     L"Suppress a property page"
  690. #define  WIA_NUM_IPA (1 + WIA_IPA_LAST - WIA_IPA_FIRST)
  691. //
  692. // Camera item properties
  693. //
  694. #define WIA_IPC_FIRST                          WIA_IPA_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  695. #define WIA_IPC_THUMBNAIL                      WIA_IPC_FIRST + 0
  696. #define WIA_IPC_THUMB_WIDTH                    WIA_IPC_FIRST + 1
  697. #define WIA_IPC_THUMB_HEIGHT                   WIA_IPC_FIRST + 2
  698. #define WIA_IPC_AUDIO_AVAILABLE                WIA_IPC_FIRST + 3
  699. #define WIA_IPC_AUDIO_DATA_FORMAT              WIA_IPC_FIRST + 4
  700. #define WIA_IPC_AUDIO_DATA                     WIA_IPC_FIRST + 5
  701. #define WIA_IPC_NUM_PICT_PER_ROW               WIA_IPC_FIRST + 6
  702. #define WIA_IPC_SEQUENCE                       WIA_IPC_FIRST + 7
  703. #define WIA_IPC_TIMEDELAY                      WIA_IPC_FIRST + 8
  704. #define WIA_IPC_LAST                           WIA_IPC_FIRST + 8
  705. #define WIA_IPC_THUMBNAIL_STR                  L"Thumbnail Data"
  706. #define WIA_IPC_THUMB_WIDTH_STR                L"Thumbnail Width"
  707. #define WIA_IPC_THUMB_HEIGHT_STR               L"Thumbnail Height"
  708. #define WIA_IPC_AUDIO_AVAILABLE_STR            L"Audio Available"
  709. #define WIA_IPC_AUDIO_DATA_FORMAT_STR          L"Audio Format"
  710. #define WIA_IPC_AUDIO_DATA_STR                 L"Audio Data"
  711. #define WIA_IPC_NUM_PICT_PER_ROW_STR           L"Pictures per Row"
  712. #define WIA_IPC_SEQUENCE_STR                   L"Sequence Number"
  713. #define WIA_IPC_TIMEDELAY_STR                  L"Time Delay"
  714. #define WIA_NUM_IPC (1 + WIA_IPC_LAST - WIA_IPC_FIRST)
  715. //
  716. // Scanner item properties
  717. //
  718. #define WIA_IPS_FIRST                          WIA_IPC_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  719. #define WIA_IPS_CUR_INTENT                     WIA_IPS_FIRST + 0
  720. #define WIA_IPS_XRES                           WIA_IPS_FIRST + 1
  721. #define WIA_IPS_YRES                           WIA_IPS_FIRST + 2
  722. #define WIA_IPS_XPOS                           WIA_IPS_FIRST + 3
  723. #define WIA_IPS_YPOS                           WIA_IPS_FIRST + 4
  724. #define WIA_IPS_XEXTENT                        WIA_IPS_FIRST + 5
  725. #define WIA_IPS_YEXTENT                        WIA_IPS_FIRST + 6
  726. #define WIA_IPS_PHOTOMETRIC_INTERP             WIA_IPS_FIRST + 7
  727. #define WIA_IPS_BRIGHTNESS                     WIA_IPS_FIRST + 8
  728. #define WIA_IPS_CONTRAST                       WIA_IPS_FIRST + 9
  729. #define WIA_IPS_ORIENTATION                    WIA_IPS_FIRST + 10
  730. #define WIA_IPS_ROTATION                       WIA_IPS_FIRST + 11
  731. #define WIA_IPS_MIRROR                         WIA_IPS_FIRST + 12
  732. #define WIA_IPS_THRESHOLD                      WIA_IPS_FIRST + 13
  733. #define WIA_IPS_INVERT                         WIA_IPS_FIRST + 14
  734. #define WIA_IPS_WARM_UP_TIME                   WIA_IPS_FIRST + 15
  735. #define WIA_IPS_LAST                           WIA_IPS_FIRST + 15
  736. #define WIA_IPS_CUR_INTENT_STR                 L"Current Intent"
  737. #define WIA_IPS_XRES_STR                       L"Horizontal Resolution"
  738. #define WIA_IPS_YRES_STR                       L"Vertical Resolution"
  739. #define WIA_IPS_XPOS_STR                       L"Horizontal Start Position"
  740. #define WIA_IPS_YPOS_STR                       L"Vertical Start Position"
  741. #define WIA_IPS_XEXTENT_STR                    L"Horizontal Extent"
  742. #define WIA_IPS_YEXTENT_STR                    L"Vertical Extent"
  743. #define WIA_IPS_PHOTOMETRIC_INTERP_STR         L"Photometric Interpretation"
  744. #define WIA_IPS_BRIGHTNESS_STR                 L"Brightness"
  745. #define WIA_IPS_CONTRAST_STR                   L"Contrast"
  746. #define WIA_IPS_ORIENTATION_STR                L"Orientation"
  747. #define WIA_IPS_ROTATION_STR                   L"Rotation"
  748. #define WIA_IPS_MIRROR_STR                     L"Mirror"
  749. #define WIA_IPS_THRESHOLD_STR                  L"Threshold"
  750. #define WIA_IPS_INVERT_STR                     L"Invert"
  751. #define WIA_IPS_WARM_UP_TIME_STR               L"Lamp Warm up Time"
  752. #define WIA_NUM_IPS (1 + WIA_IPS_LAST - WIA_IPS_FIRST)
  753. //**************************************************************************
  754. //
  755. // Vendor defined property area
  756. //
  757. //**************************************************************************
  758. #define WIA_PRIVATE_DEVPROP    (WIA_IPS_FIRST + WIA_RESERVED_FOR_ALL_MS_PROPS)
  759. #define WIA_PRIVATE_ITEMPROP   (WIA_PRIVATE_DEVPROP + WIA_RESERVED_FOR_ALL_MS_PROPS)
  760. //**************************************************************************
  761. //
  762. // WIA Property Constants
  763. //
  764. //**************************************************************************
  765. //
  766. // WIA_DPC_WHITE_BALANCE constants
  767. //
  768. #define WHITEBALANCE_MANUAL        1
  769. #define WHITEBALANCE_AUTO          2
  770. #define WHITEBALANCE_ONEPUSH_AUTO      3
  771. #define WHITEBALANCE_DAYLIGHT          4
  772. #define WHITEBALANCE_FLORESCENT        5
  773. #define WHITEBALANCE_TUNGSTEN          6
  774. #define WHITEBALANCE_FLASH         7
  775. //
  776. // WIA_DPC_FOCUS_MODE constants
  777. //
  778. #define FOCUSMODE_MANUAL        1
  779. #define FOCUSMODE_AUTO          2
  780. #define FOCUSMODE_MACROAUTO     3
  781. //
  782. // WIA_DPC_EXPOSURE_METERING_MODE constants
  783. //
  784. #define EXPOSUREMETERING_AVERAGE    1
  785. #define EXPOSUREMETERING_CENTERWEIGHT   2
  786. #define EXPOSUREMETERING_MULTISPOT  3
  787. #define EXPOSUREMETERING_CENTERSPOT 4
  788. //
  789. // WIA_DPC_FLASH_MODE constants
  790. //
  791. #define FLASHMODE_AUTO          1
  792. #define FLASHMODE_OFF           2
  793. #define FLASHMODE_FILL          3
  794. #define FLASHMODE_REDEYE_AUTO       4
  795. #define FLASHMODE_REDEYE_FILL       5
  796. #define FLASHMODE_EXTERNALSYNC      6
  797. //
  798. // WIA_DPC_EXPOSURE_MODE constants
  799. //
  800. #define EXPOSUREMODE_MANUAL     1
  801. #define EXPOSUREMODE_AUTO       2
  802. #define EXPOSUREMODE_APERTURE_PRIORITY  3
  803. #define EXPOSUREMODE_SHUTTER_PRIORITY   4
  804. #define EXPOSUREMODE_PROGRAM_CREATIVE   5
  805. #define EXPOSUREMODE_PROGRAM_ACTION 6
  806. #define EXPOSUREMODE_PORTRAIT       7
  807. //
  808. // WIA_DPC_CAPTURE_MODE constants
  809. //
  810. #define CAPTUREMODE_NORMAL      1
  811. #define CAPTUREMODE_BURST       2
  812. #define CAPTUREMODE_TIMELAPSE       3
  813. //
  814. // WIA_DPC_EFFECT_MODE constants
  815. //
  816. #define EFFECTMODE_STANDARD     1
  817. #define EFFECTMODE_BW           2
  818. #define EFFECTMODE_SEPIA        3
  819. //
  820. // WIA_DPC_FOCUS_METERING_MODE constants
  821. //
  822. #define FOCUSMETERING_CENTERSPOT    1
  823. #define FOCUSMETERING_MULTISPOT     2
  824. //
  825. // WIA_DPC_POWER_MODE constants
  826. //
  827. #define POWERMODE_LINE              1
  828. #define POWERMODE_BATTERY           2
  829. //
  830. // WIA_DPS_SHEET_FEEDER_REGISTRATION and
  831. // WIA_DPS_HORIZONTAL_BED_REGISTRATION constants
  832. //
  833. #define  LEFT_JUSTIFIED             0
  834. #define  CENTERED                   1
  835. #define  RIGHT_JUSTIFIED            2
  836. //
  837. // WIA_DPS_VERTICAL_BED_REGISTRATION constants
  838. //
  839. #define  TOP_JUSTIFIED              0
  840. #define  CENTERED                   1
  841. #define  BOTTOM_JUSTIFIED           2
  842. //
  843. // WIA_DPS_ORIENTATION and WIA_DPS_ROTATION constants
  844. //
  845. #define  PORTRAIT                   0
  846. #define  LANSCAPE                   1
  847. #define  ROT180                     2
  848. #define  ROT270                     3
  849. //
  850. // WIA_DPS_MIRROR flags
  851. //
  852. #define  MIRRORED                   0x01
  853. //
  854. // WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES flags
  855. //
  856. #define  FEED                       0x01
  857. #define  FLAT                       0x02
  858. #define  DUP                        0x04
  859. #define  DETECT_FLAT                0x08
  860. #define  DETECT_SCAN                0x10
  861. #define  DETECT_FEED                0x20
  862. #define  DETECT_DUP                 0x40
  863. #define  DETECT_FEED_AVAIL          0x80
  864. #define  DETECT_DUP_AVAIL           0x100
  865. //
  866. // WIA_DPS_DOCUMENT_HANDLING_STATUS flags
  867. //
  868. #define  FEED_READY                 0x01
  869. #define  FLAT_READY                 0x02
  870. #define  DUP_READY                  0x04
  871. #define  FLAT_COVER_UP              0x08
  872. #define  PATH_COVER_UP              0x10
  873. #define  PAPER_JAM                  0x20
  874. //
  875. // WIA_DPS_DOCUMENT_HANDLING_SELECT flags
  876. //
  877. #define  FEEDER                     0x001
  878. #define  FLATBED                    0x002
  879. #define  DUPLEX                     0x004
  880. #define  FRONT_FIRST                0x008
  881. #define  BACK_FIRST                 0x010
  882. #define  FRONT_ONLY                 0x020
  883. #define  BACK_ONLY                  0x040
  884. #define  NEXT_PAGE                  0x080
  885. #define  PREFEED                    0x100
  886. #define  AUTO_ADVANCE               0x200
  887. //
  888. // WIA_DPS_TRANSPARENCY flags
  889. //
  890. #define  LIGHT_SOURCE_PRESENT_DETECT 0x01
  891. #define  LIGHT_SOURCE_PRESENT        0x02
  892. #define  LIGHT_SOURCE_DETECT_READY   0x04
  893. #define  LIGHT_SOURCE_READY          0x08
  894. //
  895. // WIA_DPS_TRANSPARENCY_SELECT flags
  896. //
  897. #define  LIGHT_SOURCE_SELECT        0x001
  898. //
  899. // WIA_DPS_SCAN_AHEAD_PAGES constants
  900. //
  901. #define  WIA_SCAN_AHEAD_ALL         0
  902. //
  903. // WIA_DPS_PAGES constants
  904. //
  905. #define  ALL_PAGES                  0
  906. //
  907. // WIA_DPS_PREVIEW constants
  908. //
  909. #define WIA_FINAL_SCAN              0
  910. #define WIA_PREVIEW_SCAN            1
  911. //
  912. // WIA_DPS_SHOW_PREVIEW_CONTROL constants
  913. //
  914. #define WIA_SHOW_PREVIEW_CONTROL        0
  915. #define WIA_DONT_SHOW_PREVIEW_CONTROL   1
  916. //
  917. // Predefined strings for WIA_DPS_ENDORSER_STRING
  918. //
  919. #define WIA_ENDORSER_TOK_DATE       L"$DATE$"
  920. #define WIA_ENDORSER_TOK_TIME       L"$TIME$"
  921. #define WIA_ENDORSER_TOK_PAGE_COUNT L"$PAGE_COUNT$"
  922. #define WIA_ENDORSER_TOK_DAY        L"$DAY$"
  923. #define WIA_ENDORSER_TOK_MONTH      L"$MONTH$"
  924. #define WIA_ENDORSER_TOK_YEAR       L"$YEAR$"
  925. //
  926. // WIA_DPS_PAGE_SIZE constants
  927. //
  928. #define WIA_PAGE_A4         0
  929. #define WIA_PAGE_LETTER     1
  930. #define WIA_PAGE_CUSTOM     2
  931. //
  932. // WIA_IPA_COMPRESSION constants
  933. //
  934. #define WIA_COMPRESSION_NONE        0
  935. #define WIA_COMPRESSION_BI_RLE4     1
  936. #define WIA_COMPRESSION_BI_RLE8     2
  937. #define WIA_COMPRESSION_G3          3
  938. #define WIA_COMPRESSION_G4          4
  939. #define WIA_COMPRESSION_JPEG        5
  940. //
  941. // WIA_IPA_PLANAR constants
  942. //
  943. #define WIA_PACKED_PIXEL            0
  944. #define WIA_PLANAR                  1
  945. //
  946. // WIA_IPA_DATATYPE constants
  947. //
  948. #define WIA_DATA_THRESHOLD                      0
  949. #define WIA_DATA_DITHER                         1
  950. #define WIA_DATA_GRAYSCALE                      2
  951. #define WIA_DATA_COLOR                          3
  952. #define WIA_DATA_COLOR_THRESHOLD                4
  953. #define WIA_DATA_COLOR_DITHER                   5
  954. //
  955. // WIA_IPA_SUPPRESS_PROPERTY_PAGE flags
  956. //
  957. #define WIA_PROPPAGE_SCANNER_ITEM_GENERAL       0x00000001
  958. #define WIA_PROPPAGE_CAMERA_ITEM_GENERAL        0x00000002
  959. //
  960. // WIA_IPS_CUR_INTENT flags
  961. //
  962. #define WIA_INTENT_NONE                 0x00000000
  963. #define WIA_INTENT_IMAGE_TYPE_COLOR     0x00000001
  964. #define WIA_INTENT_IMAGE_TYPE_GRAYSCALE 0x00000002
  965. #define WIA_INTENT_IMAGE_TYPE_TEXT      0x00000004
  966. #define WIA_INTENT_IMAGE_TYPE_MASK      0x0000000F
  967. #define WIA_INTENT_MINIMIZE_SIZE        0x00010000
  968. #define WIA_INTENT_MAXIMIZE_QUALITY     0x00020000
  969. #define WIA_INTENT_BEST_PREVIEW         0x00040000
  970. #define WIA_INTENT_SIZE_MASK            0x000F0000
  971. //
  972. // WIA_IPS_PHOTOMETRIC_INTERP constants
  973. //
  974. #define WIA_PHOTO_WHITE_1      0   // default, white is 1, black is 0
  975. #define WIA_PHOTO_WHITE_0      1   // default, white is 0, black is 1
  976. //**************************************************************************
  977. //
  978. // WIA Extended Property Identifiers
  979. //
  980. //**************************************************************************
  981. #define  WIA_RANGE_MIN                          0
  982. #define  WIA_RANGE_NOM                          1
  983. #define  WIA_RANGE_MAX                          2
  984. #define  WIA_RANGE_STEP                         3
  985. #define  WIA_RANGE_NUM_ELEMS                    4
  986. #define  WIA_LIST_COUNT                         0
  987. #define  WIA_LIST_NOM                           1
  988. #define  WIA_LIST_VALUES                        2
  989. #define  WIA_LIST_NUM_ELEMS                     2
  990. #define  WIA_FLAG_NOM                           0
  991. #define  WIA_FLAG_VALUES                        1
  992. #define  WIA_FLAG_NUM_ELEMS                     2
  993. //**************************************************************************
  994. //
  995. // Property id to string mapping
  996. //
  997. //**************************************************************************
  998. #ifdef DEFINE_WIA_PROPID_TO_NAME
  999. WIA_PROPID_TO_NAME g_wiaPropIdToName[] =
  1000. {
  1001.     {WIA_DIP_DEV_ID,                          WIA_DIP_DEV_ID_STR},
  1002.     {WIA_DIP_VEND_DESC,                       WIA_DIP_VEND_DESC_STR},
  1003.     {WIA_DIP_DEV_DESC,                        WIA_DIP_DEV_DESC_STR},
  1004.     {WIA_DIP_DEV_TYPE,                        WIA_DIP_DEV_TYPE_STR},
  1005.     {WIA_DIP_PORT_NAME,                       WIA_DIP_PORT_NAME_STR},
  1006.     {WIA_DIP_DEV_NAME,                        WIA_DIP_DEV_NAME_STR},
  1007.     {WIA_DIP_SERVER_NAME,                     WIA_DIP_SERVER_NAME_STR},
  1008.     {WIA_DIP_REMOTE_DEV_ID,                   WIA_DIP_REMOTE_DEV_ID_STR},
  1009.     {WIA_DIP_UI_CLSID,                        WIA_DIP_UI_CLSID_STR},
  1010.     {WIA_DIP_HW_CONFIG,                       WIA_DIP_HW_CONFIG_STR},
  1011.     {WIA_DIP_BAUDRATE,                        WIA_DIP_BAUDRATE_STR},
  1012.     {WIA_DIP_STI_GEN_CAPABILITIES,            WIA_DIP_STI_GEN_CAPABILITIES_STR},
  1013.     {WIA_DIP_WIA_VERSION,                     WIA_DIP_WIA_VERSION_STR},
  1014.     {WIA_DIP_DRIVER_VERSION,                  WIA_DIP_DRIVER_VERSION_STR},
  1015.     {WIA_DPA_FIRMWARE_VERSION,                WIA_DPA_FIRMWARE_VERSION_STR},
  1016.     {WIA_DPA_CONNECT_STATUS,                  WIA_DPA_CONNECT_STATUS_STR},
  1017.     {WIA_DPA_DEVICE_TIME,                     WIA_DPA_DEVICE_TIME_STR},
  1018.     {WIA_DPC_PICTURES_TAKEN,                  WIA_DPC_PICTURES_TAKEN_STR},
  1019.     {WIA_DPC_PICTURES_REMAINING,              WIA_DPC_PICTURES_REMAINING_STR},
  1020.     {WIA_DPC_EXPOSURE_MODE,                   WIA_DPC_EXPOSURE_MODE_STR},
  1021.     {WIA_DPC_EXPOSURE_COMP,                   WIA_DPC_EXPOSURE_COMP_STR},
  1022.     {WIA_DPC_EXPOSURE_TIME,                   WIA_DPC_EXPOSURE_TIME_STR},
  1023.     {WIA_DPC_FNUMBER,                         WIA_DPC_FNUMBER_STR},
  1024.     {WIA_DPC_FLASH_MODE,                      WIA_DPC_FLASH_MODE_STR},
  1025.     {WIA_DPC_FOCUS_MODE,                      WIA_DPC_FOCUS_MODE_STR},
  1026.     {WIA_DPC_FOCUS_MANUAL_DIST,               WIA_DPC_FOCUS_MANUAL_DIST_STR},
  1027.     {WIA_DPC_ZOOM_POSITION,                   WIA_DPC_ZOOM_POSITION_STR},
  1028.     {WIA_DPC_PAN_POSITION,                    WIA_DPC_PAN_POSITION_STR},
  1029.     {WIA_DPC_TILT_POSITION,                   WIA_DPC_TILT_POSITION_STR},
  1030.     {WIA_DPC_TIMER_MODE,                      WIA_DPC_TIMER_MODE_STR},
  1031.     {WIA_DPC_TIMER_VALUE,                     WIA_DPC_TIMER_VALUE_STR},
  1032.     {WIA_DPC_POWER_MODE,                      WIA_DPC_POWER_MODE_STR},
  1033.     {WIA_DPC_BATTERY_STATUS,                  WIA_DPC_BATTERY_STATUS_STR},
  1034.     {WIA_DPC_DIMENSION,                       WIA_DPC_DIMENSION_STR},
  1035.     {WIA_DPS_HORIZONTAL_BED_SIZE,             WIA_DPS_HORIZONTAL_BED_SIZE_STR},
  1036.     {WIA_DPS_VERTICAL_BED_SIZE,               WIA_DPS_VERTICAL_BED_SIZE_STR},
  1037.     {WIA_DPS_HORIZONTAL_SHEET_FEED_SIZE,      WIA_DPS_HORIZONTAL_SHEET_FEED_SIZE_STR},
  1038.     {WIA_DPS_VERTICAL_SHEET_FEED_SIZE,        WIA_DPS_VERTICAL_SHEET_FEED_SIZE_STR},
  1039.     {WIA_DPS_SHEET_FEEDER_REGISTRATION,       WIA_DPS_SHEET_FEEDER_REGISTRATION_STR},
  1040.     {WIA_DPS_HORIZONTAL_BED_REGISTRATION,     WIA_DPS_HORIZONTAL_BED_REGISTRATION_STR},
  1041.     {WIA_DPS_VERTICAL_BED_REGISTRATION,       WIA_DPS_VERTICAL_BED_REGISTRATION_STR},
  1042.     {WIA_DPS_PLATEN_COLOR,                    WIA_DPS_PLATEN_COLOR_STR},
  1043.     {WIA_DPS_PAD_COLOR,                       WIA_DPS_PAD_COLOR_STR},
  1044.     {WIA_DPS_FILTER_SELECT,                   WIA_DPS_FILTER_SELECT_STR},
  1045.     {WIA_DPS_DITHER_SELECT,                   WIA_DPS_DITHER_SELECT_STR},
  1046.     {WIA_DPS_DITHER_PATTERN_DATA,             WIA_DPS_DITHER_PATTERN_DATA_STR},
  1047.     {WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES,  WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES_STR},
  1048.     {WIA_DPS_DOCUMENT_HANDLING_STATUS,        WIA_DPS_DOCUMENT_HANDLING_STATUS_STR},
  1049.     {WIA_DPS_DOCUMENT_HANDLING_SELECT,        WIA_DPS_DOCUMENT_HANDLING_SELECT_STR},
  1050.     {WIA_DPS_DOCUMENT_HANDLING_CAPACITY,      WIA_DPS_DOCUMENT_HANDLING_CAPACITY_STR},
  1051.     {WIA_DPS_OPTICAL_XRES,                    WIA_DPS_OPTICAL_XRES_STR},
  1052.     {WIA_DPS_OPTICAL_YRES,                    WIA_DPS_OPTICAL_YRES_STR},
  1053.     {WIA_DPS_ENDORSER_CHARACTERS,             WIA_DPS_ENDORSER_CHARACTERS_STR},
  1054.     {WIA_DPS_ENDORSER_STRING,                 WIA_DPS_ENDORSER_STRING_STR},
  1055.     {WIA_DPS_SCAN_AHEAD_PAGES,                WIA_DPS_SCAN_AHEAD_PAGES_STR},
  1056.     {WIA_DPS_MAX_SCAN_TIME,                   WIA_DPS_MAX_SCAN_TIME_STR},
  1057.     {WIA_DPS_PAGES,                           WIA_DPS_PAGES_STR},
  1058.     {WIA_DPS_PAGE_SIZE,                       WIA_DPS_PAGE_SIZE_STR},
  1059.     {WIA_DPS_PAGE_WIDTH,                      WIA_DPS_PAGE_WIDTH_STR},
  1060.     {WIA_DPS_PAGE_HEIGHT,                     WIA_DPS_PAGE_HEIGHT_STR},
  1061.     {WIA_DPS_PREVIEW,                         WIA_DPS_PREVIEW_STR},
  1062.     {WIA_DPS_TRANSPARENCY,                    WIA_DPS_TRANSPARENCY_STR},
  1063.     {WIA_DPS_TRANSPARENCY_SELECT,             WIA_DPS_TRANSPARENCY_SELECT_STR},
  1064.     {WIA_DPS_SHOW_PREVIEW_CONTROL,            WIA_DPS_SHOW_PREVIEW_CONTROL_STR},
  1065.     {WIA_DPS_MIN_HORIZONTAL_SHEET_FEED_SIZE,  WIA_DPS_MIN_HORIZONTAL_SHEET_FEED_SIZE_STR},
  1066.     {WIA_DPS_MIN_VERTICAL_SHEET_FEED_SIZE,    WIA_DPS_MIN_VERTICAL_SHEET_FEED_SIZE_STR},
  1067.     {WIA_DPV_LAST_PICTURE_TAKEN,              WIA_DPV_LAST_PICTURE_TAKEN_STR},
  1068.     {WIA_DPV_IMAGES_DIRECTORY,                WIA_DPV_IMAGES_DIRECTORY_STR},
  1069.     {WIA_DPV_DSHOW_DEVICE_PATH,               WIA_DPV_DSHOW_DEVICE_PATH_STR},
  1070.     {WIA_DPF_MOUNT_POINT,                     WIA_DPF_MOUNT_POINT_STR},
  1071.     {WIA_IPA_ITEM_NAME,                       WIA_IPA_ITEM_NAME_STR},
  1072.     {WIA_IPA_FULL_ITEM_NAME,                  WIA_IPA_FULL_ITEM_NAME_STR},
  1073.     {WIA_IPA_ITEM_TIME,                       WIA_IPA_ITEM_TIME_STR},
  1074.     {WIA_IPA_ITEM_FLAGS,                      WIA_IPA_ITEM_FLAGS_STR},
  1075.     {WIA_IPA_ACCESS_RIGHTS,                   WIA_IPA_ACCESS_RIGHTS_STR},
  1076.     {WIA_IPA_DATATYPE,                        WIA_IPA_DATATYPE_STR},
  1077.     {WIA_IPA_DEPTH,                           WIA_IPA_DEPTH_STR},
  1078.     {WIA_IPA_PREFERRED_FORMAT,                WIA_IPA_PREFERRED_FORMAT_STR},
  1079.     {WIA_IPA_FORMAT,                          WIA_IPA_FORMAT_STR},
  1080.     {WIA_IPA_COMPRESSION,                     WIA_IPA_COMPRESSION_STR},
  1081.     {WIA_IPA_TYMED,                           WIA_IPA_TYMED_STR},
  1082.     {WIA_IPA_CHANNELS_PER_PIXEL,              WIA_IPA_CHANNELS_PER_PIXEL_STR},
  1083.     {WIA_IPA_BITS_PER_CHANNEL,                WIA_IPA_BITS_PER_CHANNEL_STR},
  1084.     {WIA_IPA_PLANAR,                          WIA_IPA_PLANAR_STR},
  1085.     {WIA_IPA_PIXELS_PER_LINE,                 WIA_IPA_PIXELS_PER_LINE_STR},
  1086.     {WIA_IPA_BYTES_PER_LINE,                  WIA_IPA_BYTES_PER_LINE_STR},
  1087.     {WIA_IPA_NUMBER_OF_LINES,                 WIA_IPA_NUMBER_OF_LINES_STR},
  1088.     {WIA_IPA_GAMMA_CURVES,                    WIA_IPA_GAMMA_CURVES_STR},
  1089.     {WIA_IPA_ITEM_SIZE,                       WIA_IPA_ITEM_SIZE_STR},
  1090.     {WIA_IPA_COLOR_PROFILE,                   WIA_IPA_COLOR_PROFILE_STR},
  1091.     {WIA_IPA_MIN_BUFFER_SIZE,                 WIA_IPA_MIN_BUFFER_SIZE_STR},
  1092.     {WIA_IPA_REGION_TYPE,                     WIA_IPA_REGION_TYPE_STR},
  1093.     {WIA_IPA_ICM_PROFILE_NAME,                WIA_IPA_ICM_PROFILE_NAME_STR},
  1094.     {WIA_IPA_APP_COLOR_MAPPING,               WIA_IPA_APP_COLOR_MAPPING_STR},
  1095.     {WIA_IPA_PROP_STREAM_COMPAT_ID,           WIA_IPA_PROP_STREAM_COMPAT_ID_STR},
  1096.     {WIA_IPA_FILENAME_EXTENSION,              WIA_IPA_FILENAME_EXTENSION_STR},
  1097.     {WIA_IPA_SUPPRESS_PROPERTY_PAGE,          WIA_IPA_SUPPRESS_PROPERTY_PAGE_STR},
  1098.     {WIA_IPC_THUMBNAIL,                       WIA_IPC_THUMBNAIL_STR},
  1099.     {WIA_IPC_THUMB_WIDTH,                     WIA_IPC_THUMB_WIDTH_STR},
  1100.     {WIA_IPC_THUMB_HEIGHT,                    WIA_IPC_THUMB_HEIGHT_STR},
  1101.     {WIA_IPC_AUDIO_AVAILABLE,                 WIA_IPC_AUDIO_AVAILABLE_STR},
  1102.     {WIA_IPC_AUDIO_DATA_FORMAT,               WIA_IPC_AUDIO_DATA_FORMAT_STR},
  1103.     {WIA_IPC_AUDIO_DATA,                      WIA_IPC_AUDIO_DATA_STR},
  1104.     {WIA_IPC_NUM_PICT_PER_ROW,                WIA_IPC_NUM_PICT_PER_ROW_STR},
  1105.     {WIA_IPC_SEQUENCE,                        WIA_IPC_SEQUENCE_STR},
  1106.     {WIA_IPC_TIMEDELAY,                       WIA_IPC_TIMEDELAY_STR},
  1107.     {WIA_IPS_CUR_INTENT,                      WIA_IPS_CUR_INTENT_STR},
  1108.     {WIA_IPS_XRES,                            WIA_IPS_XRES_STR},
  1109.     {WIA_IPS_YRES,                            WIA_IPS_YRES_STR},
  1110.     {WIA_IPS_XPOS,                            WIA_IPS_XPOS_STR},
  1111.     {WIA_IPS_YPOS,                            WIA_IPS_YPOS_STR},
  1112.     {WIA_IPS_XEXTENT,                         WIA_IPS_XEXTENT_STR},
  1113.     {WIA_IPS_YEXTENT,                         WIA_IPS_YEXTENT_STR},
  1114.     {WIA_IPS_PHOTOMETRIC_INTERP,              WIA_IPS_PHOTOMETRIC_INTERP_STR},
  1115.     {WIA_IPS_BRIGHTNESS,                      WIA_IPS_BRIGHTNESS_STR},
  1116.     {WIA_IPS_CONTRAST,                        WIA_IPS_CONTRAST_STR},
  1117.     {WIA_IPS_ORIENTATION,                     WIA_IPS_ORIENTATION_STR},
  1118.     {WIA_IPS_ROTATION,                        WIA_IPS_ROTATION_STR},
  1119.     {WIA_IPS_MIRROR,                          WIA_IPS_MIRROR_STR},
  1120.     {WIA_IPS_THRESHOLD,                       WIA_IPS_THRESHOLD_STR},
  1121.     {WIA_IPS_INVERT,                          WIA_IPS_INVERT_STR},
  1122.     {WIA_IPS_WARM_UP_TIME,                    WIA_IPS_WARM_UP_TIME_STR},
  1123.     {0,                                       L"Not a WIA property"}
  1124. };
  1125. #else
  1126. extern WIA_PROPID_TO_NAME g_wiaPropIdToName[];
  1127. #endif
  1128. #endif //WIAPROP_H_INCLUDED
  1129. //
  1130. //   Macro Helpers
  1131. //
  1132. #define WIA_PROP_LIST_COUNT(ppv) (((PROPVARIANT*)ppv)->cal.cElems - WIA_LIST_VALUES)
  1133. #define WIA_PROP_LIST_VALUE(ppv, index)                              \
  1134.      ((index > ((PROPVARIANT*) ppv)->cal.cElems - WIA_LIST_VALUES) || (index < -WIA_LIST_NOM)) ?\
  1135.      NULL :                                                          \
  1136.      (((PROPVARIANT*) ppv)->vt == VT_UI1) ?                          \
  1137.      ((PROPVARIANT*) ppv)->caub.pElems[WIA_LIST_VALUES + index] :    \
  1138.      (((PROPVARIANT*) ppv)->vt == VT_UI2) ?                          \
  1139.      ((PROPVARIANT*) ppv)->caui.pElems[WIA_LIST_VALUES + index] :    \
  1140.      (((PROPVARIANT*) ppv)->vt == VT_UI4) ?                          \
  1141.      ((PROPVARIANT*) ppv)->caul.pElems[WIA_LIST_VALUES + index] :    \
  1142.      (((PROPVARIANT*) ppv)->vt == VT_I2) ?                           \
  1143.      ((PROPVARIANT*) ppv)->cai.pElems[WIA_LIST_VALUES + index] :     \
  1144.      (((PROPVARIANT*) ppv)->vt == VT_I4) ?                           \
  1145.      ((PROPVARIANT*) ppv)->cal.pElems[WIA_LIST_VALUES + index] :     \
  1146.      (((PROPVARIANT*) ppv)->vt == VT_R4) ?                           \
  1147.      ((PROPVARIANT*) ppv)->caflt.pElems[WIA_LIST_VALUES + index] :   \
  1148.      (((PROPVARIANT*) ppv)->vt == VT_R8) ?                           \
  1149.      ((PROPVARIANT*) ppv)->cadbl.pElems[WIA_LIST_VALUES + index] :   \
  1150.      (((PROPVARIANT*) ppv)->vt == VT_BSTR) ?                         \
  1151.      (LONG)(((PROPVARIANT*) ppv)->cabstr.pElems[WIA_LIST_VALUES + index]) : \
  1152.      NULL
  1153. //
  1154. //   End of Macro Helpers
  1155. //
  1156. #ifdef __cplusplus
  1157. };
  1158. #endif
  1159. //
  1160. // Reset packing
  1161. //
  1162. #include <poppack.h>
  1163. #endif // _WIADEF_H_