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.

602 lines
31 KiB

  1. // wiascr.idl : IDL source for wiascr.dll
  2. //
  3. // This file will be processed by the MIDL tool to
  4. // produce the type library (wiascr.tlb) and marshalling code.
  5. import "oaidl.idl";
  6. import "ocidl.idl";
  7. #define WIA_INTENT_IMAGE_TYPE_COLOR 0x00000001
  8. #define WIA_INTENT_IMAGE_TYPE_GRAYSCALE 0x00000002
  9. #define WIA_INTENT_IMAGE_TYPE_TEXT 0x00000004
  10. #define WIA_INTENT_MINIMIZE_SIZE 0x00010000
  11. #define WIA_INTENT_MAXIMIZE_QUALITY 0x00020000
  12. #define WIA_INTENT_BEST_PREVIEW 0x00040000
  13. #define WIA_DEVICE_DIALOG_SINGLE_IMAGE 0x00000002 // Only allow one image to be selected
  14. #define WIA_DEVICE_DIALOG_USE_COMMON_UI 0x00000004 // Give preference to the system-provided UI, if available
  15. #define WIA_RESERVED_FOR_SMALL_NEW_PROPS 256
  16. #define WIA_RESERVED_FOR_NEW_PROPS 1024
  17. #define WIA_RESERVED_FOR_ALL_MS_PROPS (1024*32)
  18. #define WIA_DIP_FIRST 2
  19. #define WIA_DIP_DEV_ID 2
  20. #define WIA_DIP_VEND_DESC 3
  21. #define WIA_DIP_DEV_DESC 4
  22. #define WIA_DIP_DEV_TYPE 5
  23. #define WIA_DIP_PORT_NAME 6
  24. #define WIA_DIP_DEV_NAME 7
  25. #define WIA_DIP_SERVER_NAME 8
  26. #define WIA_DIP_REMOTE_DEV_ID 9
  27. #define WIA_DIP_UI_CLSID 10
  28. #define WIA_DIP_HW_CONFIG 11
  29. #define WIA_DIP_BAUDRATE 12
  30. #define WIA_DIP_STI_GEN_CAPABILITIES 13
  31. #define WIA_DIP_WIA_VERSION 14
  32. #define WIA_DIP_DRIVER_VERSION 15
  33. #define WIA_DIP_LAST 15
  34. #define WIA_NUM_DIP 1 + WIA_DIP_LAST - WIA_DIP_FIRST
  35. //
  36. // Common device properties
  37. //
  38. #define WIA_DPA_FIRST WIA_DIP_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  39. #define WIA_DPA_FIRMWARE_VERSION WIA_DPA_FIRST + 0
  40. #define WIA_DPA_CONNECT_STATUS WIA_DPA_FIRST + 1
  41. #define WIA_DPA_DEVICE_TIME WIA_DPA_FIRST + 2
  42. #define WIA_DPA_LAST WIA_DPA_FIRST + 3
  43. //
  44. // Camera device properties
  45. //
  46. #define WIA_DPC_FIRST WIA_DPA_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  47. #define WIA_DPC_PICTURES_TAKEN WIA_DPC_FIRST + 0
  48. #define WIA_DPC_PICTURES_REMAINING WIA_DPC_FIRST + 1
  49. #define WIA_DPC_EXPOSURE_MODE WIA_DPC_FIRST + 2
  50. #define WIA_DPC_EXPOSURE_COMP WIA_DPC_FIRST + 3
  51. #define WIA_DPC_EXPOSURE_TIME WIA_DPC_FIRST + 4
  52. #define WIA_DPC_FNUMBER WIA_DPC_FIRST + 5
  53. #define WIA_DPC_FLASH_MODE WIA_DPC_FIRST + 6
  54. #define WIA_DPC_FOCUS_MODE WIA_DPC_FIRST + 7
  55. #define WIA_DPC_FOCUS_MANUAL_DIST WIA_DPC_FIRST + 8
  56. #define WIA_DPC_ZOOM_POSITION WIA_DPC_FIRST + 9
  57. #define WIA_DPC_PAN_POSITION WIA_DPC_FIRST + 10
  58. #define WIA_DPC_TILT_POSITION WIA_DPC_FIRST + 11
  59. #define WIA_DPC_TIMER_MODE WIA_DPC_FIRST + 12
  60. #define WIA_DPC_TIMER_VALUE WIA_DPC_FIRST + 13
  61. #define WIA_DPC_POWER_MODE WIA_DPC_FIRST + 14
  62. #define WIA_DPC_BATTERY_STATUS WIA_DPC_FIRST + 15
  63. #define WIA_DPC_THUMB_WIDTH WIA_DPC_FIRST + 16
  64. #define WIA_DPC_THUMB_HEIGHT WIA_DPC_FIRST + 17
  65. #define WIA_DPC_PICT_WIDTH WIA_DPC_FIRST + 18
  66. #define WIA_DPC_PICT_HEIGHT WIA_DPC_FIRST + 19
  67. #define WIA_DPC_DIMENSION WIA_DPC_FIRST + 20
  68. #define WIA_DPC_COMPRESSION_SETTING WIA_DPC_FIRST + 21
  69. #define WIA_DPC_FOCUS_METERING WIA_DPC_FIRST + 22
  70. #define WIA_DPC_TIMELAPSE_INTERVAL WIA_DPC_FIRST + 23
  71. #define WIA_DPC_TIMELAPSE_NUMBER WIA_DPC_FIRST + 24
  72. #define WIA_DPC_BURST_INTERVAL WIA_DPC_FIRST + 25
  73. #define WIA_DPC_BURST_NUMBER WIA_DPC_FIRST + 26
  74. #define WIA_DPC_EFFECT_MODE WIA_DPC_FIRST + 27
  75. #define WIA_DPC_DIGITAL_ZOOM WIA_DPC_FIRST + 28
  76. #define WIA_DPC_SHARPNESS WIA_DPC_FIRST + 29
  77. #define WIA_DPC_CONTRAST WIA_DPC_FIRST + 30
  78. #define WIA_DPC_CAPTURE_MODE WIA_DPC_FIRST + 31
  79. #define WIA_DPC_CAPTURE_DELAY WIA_DPC_FIRST + 32
  80. #define WIA_DPC_EXPOSURE_INDEX WIA_DPC_FIRST + 33
  81. #define WIA_DPC_EXPOSURE_METERING_MODE WIA_DPC_FIRST + 34
  82. #define WIA_DPC_FOCUS_METERING_MODE WIA_DPC_FIRST + 35
  83. #define WIA_DPC_FOCUS_DISTANCE WIA_DPC_FIRST + 36
  84. #define WIA_DPC_FOCAL_LENGTH WIA_DPC_FIRST + 37
  85. #define WIA_DPC_RGB_GAIN WIA_DPC_FIRST + 38
  86. #define WIA_DPC_WHITE_BALANCE WIA_DPC_FIRST + 39
  87. #define WIA_DPC_UPLOAD_URL WIA_DPC_FIRST + 40
  88. #define WIA_DPC_ARTIST WIA_DPC_FIRST + 41
  89. #define WIA_DPC_COPYRIGHT_INFO WIA_DPC_FIRST + 42
  90. #define WIA_DPC_LAST WIA_DPC_FIRST + 42
  91. //
  92. // Scanner device properties
  93. //
  94. #define WIA_DPS_FIRST WIA_DPC_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  95. #define WIA_DPS_HORIZONTAL_BED_SIZE WIA_DPS_FIRST + 0
  96. #define WIA_DPS_VERTICAL_BED_SIZE WIA_DPS_FIRST + 1
  97. #define WIA_DPS_HORIZONTAL_SHEET_FEED_SIZE WIA_DPS_FIRST + 2
  98. #define WIA_DPS_VERTICAL_SHEET_FEED_SIZE WIA_DPS_FIRST + 3
  99. #define WIA_DPS_SHEET_FEEDER_REGISTRATION WIA_DPS_FIRST + 4
  100. #define WIA_DPS_HORIZONTAL_BED_REGISTRATION WIA_DPS_FIRST + 5
  101. #define WIA_DPS_VERTICAL_BED_REGISTRATION WIA_DPS_FIRST + 6
  102. #define WIA_DPS_PLATEN_COLOR WIA_DPS_FIRST + 7
  103. #define WIA_DPS_PAD_COLOR WIA_DPS_FIRST + 8
  104. #define WIA_DPS_FILTER_SELECT WIA_DPS_FIRST + 9
  105. #define WIA_DPS_DITHER_SELECT WIA_DPS_FIRST + 10
  106. #define WIA_DPS_DITHER_PATTERN_DATA WIA_DPS_FIRST + 11
  107. #define WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES WIA_DPS_FIRST + 12
  108. #define WIA_DPS_DOCUMENT_HANDLING_STATUS WIA_DPS_FIRST + 13
  109. #define WIA_DPS_DOCUMENT_HANDLING_SELECT WIA_DPS_FIRST + 14
  110. #define WIA_DPS_DOCUMENT_HANDLING_CAPACITY WIA_DPS_FIRST + 15
  111. #define WIA_DPS_OPTICAL_XRES WIA_DPS_FIRST + 16
  112. #define WIA_DPS_OPTICAL_YRES WIA_DPS_FIRST + 17
  113. #define WIA_DPS_ENDORSER_CHARACTERS WIA_DPS_FIRST + 18
  114. #define WIA_DPS_ENDORSER_STRING WIA_DPS_FIRST + 19
  115. #define WIA_DPS_SCAN_AHEAD_PAGES WIA_DPS_FIRST + 20
  116. #define WIA_DPS_MAX_SCAN_TIME WIA_DPS_FIRST + 21
  117. #define WIA_DPS_PAGES WIA_DPS_FIRST + 22
  118. #define WIA_DPS_PAGE_SIZE WIA_DPS_FIRST + 23
  119. #define WIA_DPS_PAGE_WIDTH WIA_DPS_FIRST + 24
  120. #define WIA_DPS_PAGE_HEIGHT WIA_DPS_FIRST + 25
  121. #define WIA_DPS_PREVIEW WIA_DPS_FIRST + 26
  122. #define WIA_DPS_TRANSPARENCY WIA_DPS_FIRST + 27
  123. #define WIA_DPS_TRANSPARENCY_SELECT WIA_DPS_FIRST + 28
  124. #define WIA_DPS_SHOW_PREVIEW_CONTROL WIA_DPS_FIRST + 29
  125. #define WIA_DPS_MIN_HORIZONTAL_SHEET_FEED_SIZE WIA_DPS_FIRST + 30
  126. #define WIA_DPS_MIN_VERTICAL_SHEET_FEED_SIZE WIA_DPS_FIRST + 31
  127. #define WIA_DPS_LAST WIA_DPS_FIRST + 31
  128. //
  129. // File System Properties
  130. //
  131. #define WIA_DPF_FIRST WIA_DPS_FIRST + WIA_RESERVED_FOR_SMALL_NEW_PROPS
  132. #define WIA_DPF_MOUNT_POINT WIA_DPF_FIRST + 0
  133. #define WIA_DPF_LAST WIA_DPF_FIRST + 0
  134. //
  135. // Video Camera properties.
  136. //
  137. //
  138. #define WIA_DPV_FIRST WIA_DPF_FIRST + WIA_RESERVED_FOR_SMALL_NEW_PROPS
  139. #define WIA_DPV_LAST_PICTURE_TAKEN WIA_DPV_FIRST + 0
  140. #define WIA_DPV_IMAGES_DIRECTORY WIA_DPV_FIRST + 1
  141. #define WIA_DPV_DSHOW_DEVICE_PATH WIA_DPV_FIRST + 2
  142. #define WIA_DPV_LAST WIA_DPV_FIRST + 2
  143. //
  144. // Common item properties
  145. //
  146. #define WIA_IPA_FIRST WIA_DPS_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  147. #define WIA_IPA_ITEM_NAME WIA_IPA_FIRST + 0
  148. #define WIA_IPA_FULL_ITEM_NAME WIA_IPA_FIRST + 1
  149. #define WIA_IPA_ITEM_TIME WIA_IPA_FIRST + 2
  150. #define WIA_IPA_ITEM_FLAGS WIA_IPA_FIRST + 3
  151. #define WIA_IPA_ACCESS_RIGHTS WIA_IPA_FIRST + 4
  152. #define WIA_IPA_DATATYPE WIA_IPA_FIRST + 5
  153. #define WIA_IPA_DEPTH WIA_IPA_FIRST + 6
  154. #define WIA_IPA_PREFERRED_FORMAT WIA_IPA_FIRST + 7
  155. #define WIA_IPA_FORMAT WIA_IPA_FIRST + 8
  156. #define WIA_IPA_COMPRESSION WIA_IPA_FIRST + 9
  157. #define WIA_IPA_TYMED WIA_IPA_FIRST + 10
  158. #define WIA_IPA_CHANNELS_PER_PIXEL WIA_IPA_FIRST + 11
  159. #define WIA_IPA_BITS_PER_CHANNEL WIA_IPA_FIRST + 12
  160. #define WIA_IPA_PLANAR WIA_IPA_FIRST + 13
  161. #define WIA_IPA_PIXELS_PER_LINE WIA_IPA_FIRST + 14
  162. #define WIA_IPA_BYTES_PER_LINE WIA_IPA_FIRST + 15
  163. #define WIA_IPA_NUMBER_OF_LINES WIA_IPA_FIRST + 16
  164. #define WIA_IPA_GAMMA_CURVES WIA_IPA_FIRST + 17
  165. #define WIA_IPA_ITEM_SIZE WIA_IPA_FIRST + 18
  166. #define WIA_IPA_COLOR_PROFILE WIA_IPA_FIRST + 19
  167. #define WIA_IPA_MIN_BUFFER_SIZE WIA_IPA_FIRST + 20
  168. // Note: BUFFER_SIZE and MIN_BUFFER_SIZE have the same propids
  169. #define WIA_IPA_BUFFER_SIZE WIA_IPA_FIRST + 20
  170. #define WIA_IPA_REGION_TYPE WIA_IPA_FIRST + 21
  171. #define WIA_IPA_ICM_PROFILE_NAME WIA_IPA_FIRST + 22
  172. #define WIA_IPA_APP_COLOR_MAPPING WIA_IPA_FIRST + 23
  173. #define WIA_IPA_PROP_STREAM_COMPAT_ID WIA_IPA_FIRST + 24
  174. #define WIA_IPA_FILENAME_EXTENSION WIA_IPA_FIRST + 25
  175. #define WIA_IPA_SUPPRESS_PROPERTY_PAGE WIA_IPA_FIRST + 26
  176. #define WIA_IPA_LAST WIA_IPA_FIRST + 26
  177. //
  178. // Camera item properties
  179. //
  180. #define WIA_IPC_FIRST WIA_IPA_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  181. #define WIA_IPC_THUMBNAIL WIA_IPC_FIRST + 0
  182. #define WIA_IPC_THUMB_WIDTH WIA_IPC_FIRST + 1
  183. #define WIA_IPC_THUMB_HEIGHT WIA_IPC_FIRST + 2
  184. #define WIA_IPC_AUDIO_AVAILABLE WIA_IPC_FIRST + 3
  185. #define WIA_IPC_AUDIO_DATA_FORMAT WIA_IPC_FIRST + 4
  186. #define WIA_IPC_AUDIO_DATA WIA_IPC_FIRST + 5
  187. #define WIA_IPC_NUM_PICT_PER_ROW WIA_IPC_FIRST + 6
  188. #define WIA_IPC_SEQUENCE WIA_IPC_FIRST + 7
  189. #define WIA_IPC_TIMEDELAY WIA_IPC_FIRST + 8
  190. #define WIA_IPC_LAST WIA_IPC_FIRST + 8
  191. //
  192. // Scanner item properties
  193. //
  194. #define WIA_IPS_FIRST WIA_IPC_FIRST + WIA_RESERVED_FOR_NEW_PROPS
  195. #define WIA_IPS_CUR_INTENT WIA_IPS_FIRST + 0
  196. #define WIA_IPS_XRES WIA_IPS_FIRST + 1
  197. #define WIA_IPS_YRES WIA_IPS_FIRST + 2
  198. #define WIA_IPS_XPOS WIA_IPS_FIRST + 3
  199. #define WIA_IPS_YPOS WIA_IPS_FIRST + 4
  200. #define WIA_IPS_XEXTENT WIA_IPS_FIRST + 5
  201. #define WIA_IPS_YEXTENT WIA_IPS_FIRST + 6
  202. #define WIA_IPS_PHOTOMETRIC_INTERP WIA_IPS_FIRST + 7
  203. #define WIA_IPS_BRIGHTNESS WIA_IPS_FIRST + 8
  204. #define WIA_IPS_CONTRAST WIA_IPS_FIRST + 9
  205. #define WIA_IPS_ORIENTATION WIA_IPS_FIRST + 10
  206. #define WIA_IPS_ROTATION WIA_IPS_FIRST + 11
  207. #define WIA_IPS_MIRROR WIA_IPS_FIRST + 12
  208. #define WIA_IPS_THRESHOLD WIA_IPS_FIRST + 13
  209. #define WIA_IPS_INVERT WIA_IPS_FIRST + 14
  210. #define WIA_IPS_WARM_UP_TIME WIA_IPS_FIRST + 15
  211. #define WIA_IPS_LAST WIA_IPS_FIRST + 15
  212. [
  213. uuid(95CEDD63-2E34-4B84-9FB3-F86AF1D4BF7A),
  214. version(1.0),
  215. helpstring("Microsoft Windows Image Acquisition 1.01 Type Library")
  216. ]
  217. library WIALib
  218. {
  219. importlib("stdole32.tlb");
  220. importlib("stdole2.tlb");
  221. ////////////////////////////////////////////////////////////
  222. // WiaProtocol Object (used only internally)
  223. [
  224. uuid(13F3EA8B-91D7-4F0A-AD76-D2853AC8BECE),
  225. helpstring("WiaProtocol Class"),
  226. hidden
  227. ]
  228. coclass WiaProtocol
  229. {
  230. [restricted] interface IUnknown;
  231. };
  232. ////////////////////////////////////////////////////////////
  233. // Enumerations
  234. [uuid(E9F173A4-EF5C-4553-9F80-87ECFB636D9B), helpstring("WiaIntents")]
  235. typedef [public] enum WiaIntent {
  236. ImageTypeColor = WIA_INTENT_IMAGE_TYPE_COLOR,
  237. ImageTypeGrayscale = WIA_INTENT_IMAGE_TYPE_GRAYSCALE,
  238. ImageTypeText = WIA_INTENT_IMAGE_TYPE_TEXT,
  239. MinimizeSize = WIA_INTENT_MINIMIZE_SIZE,
  240. MaximizeQuality = WIA_INTENT_MAXIMIZE_QUALITY,
  241. BestPreview = WIA_INTENT_BEST_PREVIEW
  242. }
  243. WiaIntent;
  244. [uuid(56385E6A-12C5-419d-8516-062B9613E042), helpstring("WiaFlags")]
  245. typedef [public] enum WiaFlag {
  246. SingleImage = WIA_DEVICE_DIALOG_SINGLE_IMAGE,
  247. UseCommonUI = WIA_DEVICE_DIALOG_USE_COMMON_UI,
  248. }
  249. WiaFlag;
  250. [uuid(9EED984D-AAC3-43cb-A993-98403F5ADC55), helpstring("WiaDeviceInfoPropertyIds")]
  251. typedef [public] enum WiaDeviceInfoPropertyId {
  252. DeviceInfoDevId = WIA_DIP_DEV_ID,
  253. DeviceInfoVendDesc = WIA_DIP_VEND_DESC,
  254. DeviceInfoDevDesc = WIA_DIP_DEV_DESC,
  255. DeviceInfoDevType = WIA_DIP_DEV_TYPE,
  256. DeviceInfoPortName = WIA_DIP_PORT_NAME,
  257. DeviceInfoDevName = WIA_DIP_DEV_NAME,
  258. DeviceInfoServerName = WIA_DIP_SERVER_NAME,
  259. DeviceInfoRemoteDevId = WIA_DIP_REMOTE_DEV_ID,
  260. DeviceInfoUIClsid = WIA_DIP_UI_CLSID,
  261. DeviceInfoHwConfig = WIA_DIP_HW_CONFIG,
  262. DeviceInfoBaudRate = WIA_DIP_BAUDRATE,
  263. DeviceInfoStiGenCapabilities = WIA_DIP_STI_GEN_CAPABILITIES,
  264. DeviceInfoWiaVersion = WIA_DIP_WIA_VERSION,
  265. DeviceInfoDriverVersion = WIA_DIP_DRIVER_VERSION,
  266. }
  267. WiaDeviceInfoPropertyId;
  268. [uuid(A0115E47-C46A-4c1d-A3B5-5ADB9F2FCD04), helpstring("WiaDeviceItemPropertyIds")]
  269. typedef [public] enum WiaItemPropertyId {
  270. DeviceFirmwareVersion = WIA_DPA_FIRMWARE_VERSION,
  271. DeviceConnectStatus = WIA_DPA_CONNECT_STATUS,
  272. DeviceDeviceTime = WIA_DPA_DEVICE_TIME,
  273. CameraDevicePicturesTaken = WIA_DPC_PICTURES_TAKEN,
  274. CameraDevicePicturesRemaining = WIA_DPC_PICTURES_REMAINING,
  275. CameraDeviceExposureMode = WIA_DPC_EXPOSURE_MODE,
  276. CameraDeviceExposureComp = WIA_DPC_EXPOSURE_COMP,
  277. CameraDeviceExposureTime = WIA_DPC_EXPOSURE_TIME,
  278. CameraDeviceFNumber = WIA_DPC_FNUMBER,
  279. CameraDeviceFlashMode = WIA_DPC_FLASH_MODE,
  280. CameraDeviceFocusMode = WIA_DPC_FOCUS_MODE,
  281. CameraDevicePanPosition = WIA_DPC_PAN_POSITION,
  282. CameraDeviceTiltPosition = WIA_DPC_TILT_POSITION,
  283. CameraDeviceTimerMode = WIA_DPC_TIMER_MODE,
  284. CameraDeviceTimerValue = WIA_DPC_TIMER_VALUE,
  285. CameraDevicePowerMode = WIA_DPC_POWER_MODE,
  286. CameraDeviceBatteryStatus = WIA_DPC_BATTERY_STATUS,
  287. CameraDeviceThumbWidth = WIA_DPC_THUMB_WIDTH,
  288. CameraDeviceThumbHeight = WIA_DPC_THUMB_HEIGHT,
  289. CameraDevicePictWidth = WIA_DPC_PICT_WIDTH,
  290. CameraDevicePictHeight = WIA_DPC_PICT_HEIGHT,
  291. CameraDeviceCompressionSetting = WIA_DPC_COMPRESSION_SETTING,
  292. CameraDeviceTimelapseInterval = WIA_DPC_TIMELAPSE_INTERVAL,
  293. CameraDeviceTimelapseNumber = WIA_DPC_TIMELAPSE_NUMBER,
  294. CameraDeviceBurstInterval = WIA_DPC_BURST_INTERVAL,
  295. CameraDeviceBurstNumber = WIA_DPC_BURST_NUMBER,
  296. CameraDeviceEffectMode = WIA_DPC_EFFECT_MODE,
  297. CameraDeviceDigitalZoom = WIA_DPC_DIGITAL_ZOOM,
  298. CameraDeviceSharpness = WIA_DPC_SHARPNESS,
  299. CameraDeviceContrast = WIA_DPC_CONTRAST,
  300. CameraDeviceCaptureMode = WIA_DPC_CAPTURE_MODE,
  301. CameraDeviceCaptureDelay = WIA_DPC_CAPTURE_DELAY,
  302. CameraDeviceExposureIndex = WIA_DPC_EXPOSURE_INDEX,
  303. CameraDeviceExposureMeteringMode = WIA_DPC_EXPOSURE_METERING_MODE,
  304. CameraDeviceFocusMeteringMode = WIA_DPC_FOCUS_METERING_MODE,
  305. CameraDeviceFocusDistance = WIA_DPC_FOCUS_DISTANCE,
  306. CameraDeviceFocalLength = WIA_DPC_FOCAL_LENGTH,
  307. CameraDeviceRGBGain = WIA_DPC_RGB_GAIN,
  308. CameraDeviceWhiteBalance = WIA_DPC_WHITE_BALANCE,
  309. CameraDeviceUploadURL = WIA_DPC_UPLOAD_URL,
  310. CameraDeviceArtist = WIA_DPC_ARTIST,
  311. CameraDeviceCopyrightInfo = WIA_DPC_COPYRIGHT_INFO,
  312. ScannerDeviceHorizontalBedSize = WIA_DPS_HORIZONTAL_BED_SIZE,
  313. ScannerDeviceVerticalBedSize = WIA_DPS_VERTICAL_BED_SIZE,
  314. ScannerDeviceHorizontalSheetFeedSize = WIA_DPS_HORIZONTAL_SHEET_FEED_SIZE,
  315. ScannerDeviceVerticalSheetFeedSize = WIA_DPS_VERTICAL_SHEET_FEED_SIZE,
  316. ScannerDeviceSheetFeederRegistration = WIA_DPS_SHEET_FEEDER_REGISTRATION,
  317. ScannerDeviceHorizontalBedRegistration = WIA_DPS_HORIZONTAL_BED_REGISTRATION,
  318. ScannerDeviceVerticalBedRegistration = WIA_DPS_VERTICAL_BED_REGISTRATION,
  319. ScannerDevicePlatenColor = WIA_DPS_PLATEN_COLOR,
  320. ScannerDevicePadColor = WIA_DPS_PAD_COLOR,
  321. ScannerDeviceDocumentHandlingCapabilities = WIA_DPS_DOCUMENT_HANDLING_CAPABILITIES,
  322. ScannerDeviceDocumentHandlingStatus = WIA_DPS_DOCUMENT_HANDLING_STATUS,
  323. ScannerDeviceDocumentHandlingSelect = WIA_DPS_DOCUMENT_HANDLING_SELECT,
  324. ScannerDeviceDocumentHandlingCapacity = WIA_DPS_DOCUMENT_HANDLING_CAPACITY,
  325. ScannerDeviceOpticalXres = WIA_DPS_OPTICAL_XRES,
  326. ScannerDeviceOpticalYres = WIA_DPS_OPTICAL_YRES,
  327. ScannerDeviceEndorserCharacters = WIA_DPS_ENDORSER_CHARACTERS,
  328. ScannerDeviceEndorserString = WIA_DPS_ENDORSER_STRING,
  329. ScannerDeviceScanAheadPages = WIA_DPS_SCAN_AHEAD_PAGES,
  330. ScannerDeviceMaxScanTime = WIA_DPS_MAX_SCAN_TIME,
  331. ScannerDevicePages = WIA_DPS_PAGES,
  332. ScannerDevicePageSize = WIA_DPS_PAGE_SIZE,
  333. ScannerDevicePageWidth = WIA_DPS_PAGE_WIDTH,
  334. ScannerDevicePageHeight = WIA_DPS_PAGE_HEIGHT,
  335. ScannerDevicePreview = WIA_DPS_PREVIEW,
  336. ScannerDeviceTransparency = WIA_DPS_TRANSPARENCY,
  337. ScannerDeviceTransparencySelect = WIA_DPS_TRANSPARENCY_SELECT,
  338. ScannerDeviceShowPreviewControl = WIA_DPS_SHOW_PREVIEW_CONTROL,
  339. ScannerDeviceMinHorizontalSheetFeedSize = WIA_DPS_MIN_HORIZONTAL_SHEET_FEED_SIZE,
  340. ScannerDeviceMinVerticalSheetFeedSize = WIA_DPS_MIN_VERTICAL_SHEET_FEED_SIZE,
  341. FileDeviceMountPoint = WIA_DPF_MOUNT_POINT,
  342. VideoDeviceLastPictureTaken = WIA_DPV_LAST_PICTURE_TAKEN,
  343. VideoDeviceImagesDirectory = WIA_DPV_IMAGES_DIRECTORY,
  344. VideoDeviceDShowDevicePath = WIA_DPV_DSHOW_DEVICE_PATH,
  345. PictureItemName = WIA_IPA_ITEM_NAME,
  346. PictureFullItemName = WIA_IPA_FULL_ITEM_NAME,
  347. PictureItemTime = WIA_IPA_ITEM_TIME,
  348. PictureItemFlags = WIA_IPA_ITEM_FLAGS,
  349. PictureAccessRights = WIA_IPA_ACCESS_RIGHTS,
  350. PictureDatatype = WIA_IPA_DATATYPE,
  351. PictureDepth = WIA_IPA_DEPTH,
  352. PicturePreferredFormat = WIA_IPA_PREFERRED_FORMAT,
  353. PictureFormat = WIA_IPA_FORMAT,
  354. PictureCompression = WIA_IPA_COMPRESSION,
  355. PictureTymed = WIA_IPA_TYMED,
  356. PictureChannelsPerPixel = WIA_IPA_CHANNELS_PER_PIXEL,
  357. PictureBitsPerChannel = WIA_IPA_BITS_PER_CHANNEL,
  358. PicturePlanar = WIA_IPA_PLANAR,
  359. PicturePixelsPerLine = WIA_IPA_PIXELS_PER_LINE,
  360. PictureBytesPerLine = WIA_IPA_BYTES_PER_LINE,
  361. PictureNumberOfLines = WIA_IPA_NUMBER_OF_LINES,
  362. PictureGammaCurves = WIA_IPA_GAMMA_CURVES,
  363. PictureItemSize = WIA_IPA_ITEM_SIZE,
  364. PictureColorProfile = WIA_IPA_COLOR_PROFILE,
  365. PictureMinBufferSize = WIA_IPA_MIN_BUFFER_SIZE,
  366. PictureBufferSize = WIA_IPA_BUFFER_SIZE,
  367. PictureRegionType = WIA_IPA_REGION_TYPE,
  368. PictureIcmProfileName = WIA_IPA_ICM_PROFILE_NAME,
  369. PictureAppColorMapping = WIA_IPA_APP_COLOR_MAPPING,
  370. PicturePropStreamCompatId = WIA_IPA_PROP_STREAM_COMPAT_ID,
  371. PictureFilenameExtension = WIA_IPA_FILENAME_EXTENSION,
  372. PictureSuppressPropertyPage = WIA_IPA_SUPPRESS_PROPERTY_PAGE,
  373. CameraPictureThumbnail = WIA_IPC_THUMBNAIL,
  374. CameraPictureThumbWidth = WIA_IPC_THUMB_WIDTH,
  375. CameraPictureThumbHeight = WIA_IPC_THUMB_HEIGHT,
  376. CameraPictureAudioAvailable = WIA_IPC_AUDIO_AVAILABLE,
  377. CameraPictureAudioDataFormat = WIA_IPC_AUDIO_DATA_FORMAT,
  378. CameraPictureAudioData = WIA_IPC_AUDIO_DATA,
  379. CameraPictureNumPictPerRow = WIA_IPC_NUM_PICT_PER_ROW,
  380. CameraPictureSequence = WIA_IPC_SEQUENCE,
  381. CameraPictureTimedelay = WIA_IPC_TIMEDELAY,
  382. ScannerPictureCurIntent = WIA_IPS_CUR_INTENT,
  383. ScannerPictureXres = WIA_IPS_XRES,
  384. ScannerPictureYres = WIA_IPS_YRES,
  385. ScannerPictureXpos = WIA_IPS_XPOS,
  386. ScannerPictureYpos = WIA_IPS_YPOS,
  387. ScannerPictureXextent = WIA_IPS_XEXTENT,
  388. ScannerPictureYextent = WIA_IPS_YEXTENT,
  389. ScannerPicturePhotometricInterp = WIA_IPS_PHOTOMETRIC_INTERP,
  390. ScannerPictureBrightness = WIA_IPS_BRIGHTNESS,
  391. ScannerPictureContrast = WIA_IPS_CONTRAST,
  392. ScannerPictureOrientation = WIA_IPS_ORIENTATION,
  393. ScannerPictureRotation = WIA_IPS_ROTATION,
  394. ScannerPictureMirror = WIA_IPS_MIRROR,
  395. ScannerPictureThreshold = WIA_IPS_THRESHOLD,
  396. ScannerPictureInvert = WIA_IPS_INVERT,
  397. ScannerPictureWarmUpTime = WIA_IPS_WARM_UP_TIME,
  398. }
  399. WiaItemPropertyId;
  400. ////////////////////////////////////////////////////////////
  401. // Forward Reference
  402. interface ICollection;
  403. ////////////////////////////////////////////////////////////
  404. // Item Object
  405. [
  406. object,
  407. uuid(D06D503F-4B71-40f3-94A7-66478F732BC9),
  408. dual,
  409. helpstring("IWiaDeviceItem interface"),
  410. pointer_default(unique)
  411. ]
  412. interface IWiaDispatchItem : IDispatch
  413. {
  414. [propget, id(1), helpstring("Returns the current connection status")] HRESULT ConnectStatus( [out,retval] BSTR* pbstrStatus );
  415. [propget, id(2), helpstring("Returns the current time on the device")] HRESULT Time( [out,retval] BSTR* pbstrTime );
  416. [propget, id(3), helpstring("Returns the firmware version of the device")] HRESULT FirmwareVersion( [out,retval] BSTR* pbstrVersion );
  417. [id(4), helpstring("Displays the acquisition dialog box")] HRESULT GetItemsFromUI([in, defaultvalue(0)] WiaFlag Flags, [in, defaultvalue(0)] WiaIntent Intent, [out, retval] ICollection** ppCollection);
  418. [id(5), helpstring( "Transfers the item to a file, or clipboard if filename is clipboard" )] HRESULT Transfer( [in] BSTR Filename, [in, defaultvalue((VARIANT_BOOL)0)] VARIANT_BOOL AsyncTransfer );
  419. [id(6), helpstring( "Takes a Picture and returns it if successful" )] HRESULT TakePicture( [out, retval] IWiaDispatchItem** ppDispItem );
  420. [propget, id(20), helpstring("Returns the Name of the item")] HRESULT Name( [out,retval] BSTR* pbstrName );
  421. [propget, id(21), helpstring("Returns the full name of the item")] HRESULT FullName( [out,retval] BSTR* pbstrFullName );
  422. [propget, id(22), helpstring("Returns the type of this item")] HRESULT ItemType( [out,retval] BSTR* pbstrType );
  423. [propget, id(23), helpstring("Returns the width of the item in pixels")] HRESULT Width( [out,retval] long* plWidth );
  424. [propget, id(24), helpstring("Returns the height of the item in pixels")] HRESULT Height( [out,retval] long* plHeight );
  425. [propget, id(50), helpstring("Returns the width of the the item's thumbnail")] HRESULT ThumbWidth([out,retval] long* plWidth );
  426. [propget, id(51), helpstring("Returns the height of the item's thumbnail")] HRESULT ThumbHeight( [out,retval] long* plHeight );
  427. [propget, id(52), helpstring("Returns the path to the temporary image thumbnail")] HRESULT Thumbnail( [out,retval] BSTR* pbstrPath );
  428. [propget, id(53), helpstring("Returns the height of the picture")] HRESULT PictureHeight( [out, retval] long* plHeight );
  429. [propget, id(54), helpstring("Returns the width of the picture")] HRESULT PictureWidth( [out,retval] long* plWidth );
  430. [propget, id(500), helpstring("Returns a collection of this items children")] HRESULT Children( [out,retval] ICollection** ppCollection );
  431. [id(1000), helpstring("Returns the value of the property with the given id")] HRESULT GetPropById( [in] WiaItemPropertyId Id, [out,retval] VARIANT* pvaOut );
  432. };
  433. [
  434. noncreatable,
  435. uuid(E6C45109-442C-4585-BE44-F5D2884E544A),
  436. helpstring("WiaItem Class")
  437. ]
  438. coclass Item
  439. {
  440. [default] interface IWiaDispatchItem;
  441. };
  442. ////////////////////////////////////////////////////////////
  443. // DeviceInfo Object
  444. [
  445. object,
  446. uuid(5267FF5E-7CAF-4769-865D-17A25968525E),
  447. dual,
  448. helpstring("IWiaDeviceInfo Interface"),
  449. pointer_default(unique)
  450. ]
  451. interface IWiaDeviceInfo : IDispatch
  452. {
  453. [id(1), helpstring("Create an Item for this device")] HRESULT Create( [out,retval] IWiaDispatchItem** ppDevice );
  454. [propget, id(2), helpstring("Returns the id of the device")] HRESULT Id( [out,retval] BSTR* pbstrDeviceId );
  455. [propget, id(3), helpstring("Returns the name of the device" )] HRESULT Name( [out,retval] BSTR* pbstrName );
  456. [propget, id(4), helpstring("Returns the type of the device" )] HRESULT Type( [out,retval] BSTR* pbstrType );
  457. [propget, id(5), helpstring("Returns the port the device is connected to" )] HRESULT Port( [out,retval] BSTR* pbstrPort );
  458. [propget, id(6), helpstring("Returns the class id for the User Interface for this device" )] HRESULT UIClsid( [out,retval] BSTR* pbstrGuidUI );
  459. [propget, id(7), helpstring("Returns the name of the manufacturer of this device" )] HRESULT Manufacturer( [out,retval] BSTR* pbstrVendor );
  460. [id(1000), helpstring("Returns the value of the property with the given Id")] HRESULT GetPropById( [in] WiaDeviceInfoPropertyId Id, [out,retval] VARIANT* pvaOut );
  461. };
  462. [
  463. noncreatable,
  464. uuid(34E1C006-99D2-4335-B0B1-CE7B9FE5396C),
  465. helpstring("DeviceInfo Class")
  466. ]
  467. coclass DeviceInfo
  468. {
  469. [default] interface IWiaDeviceInfo;
  470. };
  471. ////////////////////////////////////////////////////////////
  472. // Collection Object
  473. [
  474. object,
  475. uuid(C34C8CE7-B253-4f89-AA25-8A24AD71D0C0),
  476. dual,
  477. helpstring("ICollection Interface"),
  478. pointer_default(unique)
  479. ]
  480. interface ICollection : IDispatch
  481. {
  482. [propget, id(0), helpstring("Returns the specified item in the collection")] HRESULT Item( [in] long Index, [out, retval] IDispatch** ppDispItem );
  483. [propget, id(1), helpstring( "Returns the number of members in the collection" )] HRESULT Count( [out,retval] long* pCount );
  484. // Hidden for backwards compatibility
  485. [propget, id(2), hidden] HRESULT Length( [out, retval] unsigned long* plLength );
  486. // hidden member required to mark interface as a collection
  487. [propget, id(DISPID_NEWENUM), hidden] HRESULT _NewEnum( [out, retval] IUnknown** ppEnum );
  488. };
  489. [
  490. noncreatable,
  491. uuid(6E27C0E7-1D45-4ca7-9BF7-BD6CDDAA1ADC),
  492. helpstring("Collection Class")
  493. ]
  494. coclass Collection
  495. {
  496. [default] interface ICollection;
  497. };
  498. ////////////////////////////////////////////////////////////
  499. // Collection Object
  500. [
  501. object,
  502. uuid(B10BA1BC-3713-4EC0-8EEA-690EBD2CED8A),
  503. dual,
  504. helpstring("IWia Interface"),
  505. pointer_default(unique)
  506. ]
  507. interface IWia : IDispatch
  508. {
  509. [propget, id(1), helpstring( "Returns the DeviceInfo collection" )] HRESULT Devices( [out, retval] ICollection** ppCol );
  510. [id(2), helpstring( "Creates a connection to the specified DeviceInfo, Id or Index" )] HRESULT Create( [in, unique] VARIANT* Device, [out,retval] IWiaDispatchItem** ppDevice );
  511. [id(10010), hidden] HRESULT _DebugDialog( BOOL fWait );
  512. };
  513. // for some reason midl doesn't put the DIID in the header
  514. // this ensures that it is in the header which makes ATL a lot
  515. // happier.
  516. //REVIEW???? cpp_quote( "EXTERN_C const GUID DIID__IWiaEvents;" )
  517. [
  518. uuid(E5F04D72-6C16-42e2-BCCA-F8D0DB4ADE06),
  519. helpstring("Events fired by the IWia interface")
  520. ]
  521. dispinterface _IWiaEvents
  522. {
  523. properties:
  524. methods:
  525. [id(1), helpstring("Occurs when a device is connected" )] void OnDeviceConnected( BSTR Id );
  526. [id(2), helpstring("Occurs when a device is disconnected")] void OnDeviceDisconnected( BSTR Id );
  527. [id(3), helpstring("Occurs when a Transfer has completed")] void OnTransferComplete( IWiaDispatchItem* Item, BSTR Path );
  528. };
  529. [
  530. uuid(4EC4272E-2E6F-4EEB-91D0-EBC4D58E8DEE),
  531. helpstring("WIA Class")
  532. ]
  533. coclass Wia
  534. {
  535. [default] interface IWia;
  536. [default, source] dispinterface _IWiaEvents;
  537. };
  538. [
  539. uuid(0DAD5531-BF31-43AC-A513-1F8926BBF5EC),
  540. helpstring("WIA Class (Safe for Scripting)")
  541. ]
  542. coclass SafeWia
  543. {
  544. [default] interface IWia;
  545. };
  546. };