Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

422 lines
15 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 1998
  4. *
  5. * TITLE: StiScr.idl
  6. *
  7. * VERSION: 2.0
  8. *
  9. * AUTHOR: ReedB
  10. *
  11. * DATE: 6 Jan, 1998
  12. *
  13. * DESCRIPTION:
  14. * IDL source for WIA device manager script interface. Visual Basic Scripting
  15. * uses variants for all variables.
  16. *
  17. *******************************************************************************/
  18. interface IWiaDevMgrDispatch;
  19. interface IEnumWiaDevInfoDispatch;
  20. interface IPropStorageDispatch;
  21. interface IWiaItemDispatch;
  22. interface IEnumWiaItemDispatch;
  23. interface IEnumStatPropStgDispatch;
  24. interface IEnumWiaDevCapsDispatch;
  25. import "unknwn.idl";
  26. import "oaidl.idl";
  27. import "propidl.idl";
  28. /*******************************************************************************
  29. *
  30. * WIA Device Manager Dispatch Interface
  31. *
  32. *******************************************************************************/
  33. [
  34. object,
  35. uuid(f768d350-f9a4-11d1-9a0b-00c04fa36145),
  36. helpstring("WIA Device Manager Dispatch Interface"),
  37. pointer_default(unique),
  38. oleautomation
  39. ]
  40. interface IWiaDevMgrDispatch : IDispatch
  41. {
  42. [id(1), helpstring("Get an image and place data in clipboard")]
  43. HRESULT GetImageClipboard(
  44. [in] LONG hwndParent,
  45. [in] LONG lDeviceType,
  46. [in] LONG lFlags,
  47. [in] LONG lIntent,
  48. [in] BSTR bstrFormat,
  49. [in, unique] IDispatch *pItem,
  50. [out, retval] LONG *lResult);
  51. [id(2), helpstring("Get an image and place data in a temporary file")]
  52. HRESULT GetImageFile(
  53. [in] LONG hwndParent,
  54. [in] LONG lDeviceType,
  55. [in] LONG lFlags,
  56. [in] LONG lIntent,
  57. [in] BSTR bstrFormat,
  58. [in, unique] IDispatch *pItem,
  59. [out, retval] BSTR *pbstrFileName);
  60. [id(3), helpstring("Create an WIA device information enumerator")]
  61. HRESULT EnumDeviceInfo(
  62. [in] LONG lFlag,
  63. [out, retval] IEnumWiaDevInfoDispatch **ppIEnum);
  64. [id(4), helpstring("Create a WIA device object")]
  65. HRESULT CreateDevice(
  66. [in] BSTR bstrDeviceID,
  67. [out, retval] IWiaItemDispatch **ppItem);
  68. [id(5), helpstring("Present UI to select then create an WIA device")]
  69. HRESULT SelectDevice(
  70. [in] LONG hwndParent,
  71. [in] LONG lDeviceType,
  72. [in] LONG lFlags,
  73. [out, retval] IWiaItemDispatch **ppItem);
  74. [id(6), helpstring("Resisters pIDisp for the event notification")]
  75. HRESULT RegisterEventCallbackInterface(
  76. [in] LONG lFlags,
  77. [in] BSTR bstrDevID,
  78. [in] BSTR guidEventID,
  79. [in] IDispatch *pIDisp);
  80. };
  81. /*******************************************************************************
  82. *
  83. * WIA Device Information Enumeration Dispatch Interface
  84. *
  85. *******************************************************************************/
  86. [
  87. object,
  88. uuid(8e25d848-8949-11d2-b081-00c04fa36145),
  89. helpstring("WIA Device Information Enumeration Interface"),
  90. pointer_default(unique)
  91. ]
  92. interface IEnumWiaDevInfoDispatch : IDispatch
  93. {
  94. [id(-4), propget, restricted, helpstring("Required enumerator for VB")]
  95. HRESULT _NewEnum(
  96. [out, retval] IUnknown **ppEnumVar);
  97. [id(0), propget, helpstring("Returns the WiaDevInfo object of the given index")]
  98. HRESULT Item(
  99. [in] LONG lIndex,
  100. [out, retval] VARIANT **retVal);
  101. [id(1), helpstring("Gets the next WiaDevInfo object")]
  102. HRESULT Next(
  103. [in] ULONG celt,
  104. [out] VARIANT *pProp,
  105. [in,out,unique] ULONG *pceltFetched);
  106. [id(2), helpstring("Skips the next WiaDevInfo object")]
  107. HRESULT Skip(
  108. [in] ULONG celt);
  109. [id(3), helpstring("Resets to first WiaDevInfo object")]
  110. HRESULT Reset(void);
  111. [id(4), helpstring("Clone Device Info enumerator object, but returns the IEnumVARIANT interface")]
  112. HRESULT Clone(
  113. [out, retval] IEnumVARIANT **ppIEnum);
  114. }
  115. /*******************************************************************************
  116. *
  117. * Property Storage Dispatch Interface
  118. *
  119. *******************************************************************************/
  120. [
  121. object,
  122. uuid(a2cef640-8f9e-11d2-b083-00c04fa36145),
  123. helpstring("Property Storage Dispatch Interface"),
  124. pointer_default(unique)
  125. ]
  126. interface IPropStorageDispatch : IDispatch
  127. {
  128. HRESULT ReadMultiple(
  129. [in] VARIANT *rgpspec,
  130. [out, retval] VARIANT *rgpropvar);
  131. HRESULT WriteMultiple(
  132. [in] VARIANT *rgpspec,
  133. [in] VARIANT *rgpropvar);
  134. HRESULT ReadPropertyNames(
  135. [in] VARIANT *pvPropSpec,
  136. [out, retval] VARIANT *pvPropNames);
  137. HRESULT Enum(
  138. [out, retval] IEnumStatPropStgDispatch **ppEnum);
  139. HRESULT WritePropertyNames(
  140. [in] VARIANT *rgpropid,
  141. [out] VARIANT *rglpwstrName);
  142. HRESULT GetPropertyAttributes(
  143. [in] VARIANT cpspec,
  144. [in] VARIANT *rgpspec,
  145. [out] VARIANT *rgflags,
  146. [out] VARIANT *rgpropvar);
  147. HRESULT GetCount(
  148. [out] VARIANT *pulNumProps);
  149. /* Not used currently
  150. HRESULT GetPropertyStream(
  151. [out] IStream **ppIStream);
  152. HRESULT SetPropertyStream(
  153. [in] IStream *pIStream);
  154. */
  155. }
  156. /*******************************************************************************
  157. *
  158. * WIA Property Storage Enumeration Dispatch Interface
  159. *
  160. *******************************************************************************/
  161. [
  162. object,
  163. uuid(340bdb90-9f44-11d2-b08a-00c04fa36145),
  164. helpstring("WIA Property Storage Enumeration Interface"),
  165. pointer_default(unique)
  166. ]
  167. interface IEnumStatPropStgDispatch : IDispatch
  168. {
  169. [id(-4), propget, restricted, helpstring("Required enumerator for VB")]
  170. HRESULT _NewEnum(
  171. [out, retval] IUnknown **ppEnumVar);
  172. [id(0), propget, helpstring("Returns the item of the given index")]
  173. HRESULT Item(
  174. [in] LONG lIndex,
  175. [out, retval] VARIANT **retVal);
  176. [id(1), helpstring("Gets the next property")]
  177. HRESULT Next(
  178. [in] ULONG celt,
  179. [out] VARIANT *pProp,
  180. [in,out,unique] ULONG *pceltFetched);
  181. [id(2), helpstring("Skips the next property")]
  182. HRESULT Skip(
  183. [in] ULONG celt);
  184. [id(3), helpstring("Resets to first property")]
  185. HRESULT Reset(void);
  186. [id(4), helpstring("Clone property enumeration object, but returns the IEnumVARIANT interface")]
  187. HRESULT Clone(
  188. [out, retval] IEnumVARIANT **ppIEnum);
  189. }
  190. /*******************************************************************************
  191. *
  192. * IWiaItemDispatch Interface
  193. *
  194. *******************************************************************************/
  195. [
  196. object,
  197. uuid(f4097433-9e68-11d2-b08a-00c04fa36145),
  198. helpstring("WIA Device Item Interface"),
  199. pointer_default(unique)
  200. ]
  201. interface IWiaItemDispatch : IDispatch
  202. {
  203. [id(1), helpstring("Get item type")]
  204. HRESULT GetItemType(
  205. [out, retval] LONG *plItemType);
  206. [id(2), helpstring("Analyze an item")]
  207. HRESULT AnalyzeItem(
  208. [in] LONG lFlags);
  209. [id(3), helpstring("Get item enumerator")]
  210. HRESULT EnumChildItems(
  211. [out, retval] IEnumWiaItemDispatch **ppIEnumWiaItem);
  212. [id(4), helpstring("Delete an item")]
  213. HRESULT DeleteItem(
  214. [in] LONG lFlags);
  215. [id(5), helpstring("Create a new child item")]
  216. HRESULT CreateChildItem(
  217. [in] LONG lFlags,
  218. [in] BSTR bstrItemName,
  219. [in] BSTR bstrFullItemName,
  220. [out, retval] IWiaItemDispatch **ppNewItem);
  221. [id(7), helpstring("Issue a device command")]
  222. HRESULT DeviceCommand(
  223. [in] LONG lFlags,
  224. [in] BSTR bstrCommand,
  225. [out, retval] IWiaItemDispatch **pIWiaItem);
  226. [id(8), helpstring("Display device data acquistion UI")]
  227. HRESULT DeviceDlg(
  228. [in] LONG hwndParent,
  229. [in] LONG lFlags,
  230. [in] LONG lIntent,
  231. [out, retval] VARIANT *pIWiaItem);
  232. [id(9), helpstring("search for item by name")]
  233. HRESULT FindItemByName(
  234. [in] LONG lFlags,
  235. [in] BSTR bstrFullItemName,
  236. [out, retval] IWiaItemDispatch **ppIWiaItem);
  237. [id(10), helpstring("Get device root item")]
  238. HRESULT GetRootItem(
  239. [out, retval] IWiaItemDispatch **ppIWiaItem);
  240. [id(11), helpstring("Read item properties")]
  241. HRESULT ReadMultiple(
  242. [in] VARIANT *rgpspec,
  243. [out, retval] VARIANT *rgpropvar);
  244. [id(12), helpstring("Write item properties")]
  245. HRESULT WriteMultiple(
  246. [in] VARIANT *rgpspec,
  247. [in] VARIANT *rgpropvar);
  248. [id(13), helpstring("Get capability enumerator")]
  249. HRESULT EnumWiaDevCaps(
  250. [in] ULONG ulFlags,
  251. [out, retval] IEnumWiaDevCapsDispatch **ppIEnum);
  252. };
  253. /*******************************************************************************
  254. *
  255. * IEnumWiaItem Interface
  256. *
  257. *******************************************************************************/
  258. [
  259. object,
  260. uuid(ff0bb94d-9e68-11d2-b08a-00c04fa36145),
  261. helpstring("WIA Device Class Item Enumeration Interface"),
  262. pointer_default(unique)
  263. ]
  264. interface IEnumWiaItemDispatch : IDispatch
  265. {
  266. [id(-4), propget, restricted, helpstring("Required enumerator for VB")]
  267. HRESULT _NewEnum(
  268. [out, retval] IUnknown **ppEnumVar);
  269. [id(0), propget, helpstring("Returns the item of the given index")]
  270. HRESULT Item(
  271. [in] LONG lIndex,
  272. [out, retval] VARIANT **retVal);
  273. [id(1), helpstring("Gets the next IWiaItem object")]
  274. HRESULT Next(
  275. [in] ULONG celt,
  276. [out] VARIANT *pItem,
  277. [in,out,unique] ULONG *pceltFetched);
  278. [id(2), helpstring("Skips the specified number of IWiaItem objects")]
  279. HRESULT Skip(
  280. [in] ULONG celt);
  281. [id(3), helpstring("Resets to first IWiaItemObject")]
  282. HRESULT Reset(void);
  283. [id(4), helpstring("Clone IWiaItem enumeration object and returns the IEnumVARIANT interface")]
  284. HRESULT Clone(
  285. [out, retval] IEnumVARIANT **ppIEnum);
  286. }
  287. /*******************************************************************************
  288. *
  289. * IEnumWiaDevCaps Interface
  290. *
  291. *******************************************************************************/
  292. [
  293. object,
  294. uuid(05B40A3C-E6BC-11d2-B5C2-00C04F68C956),
  295. helpstring("WIA Device Class Capability Enumeration Interface"),
  296. pointer_default(unique)
  297. ]
  298. interface IEnumWiaDevCapsDispatch : IDispatch
  299. {
  300. [id(-4), propget, restricted, helpstring("Required enumerator for VB")]
  301. HRESULT _NewEnum(
  302. [out, retval] IUnknown **ppEnumVar);
  303. [id(0), propget, helpstring("Returns the item of the given index")]
  304. HRESULT Item(
  305. [in] LONG lIndex,
  306. [out, retval] VARIANT **retVal);
  307. [id(1), helpstring("Gets the next capability")]
  308. HRESULT Next(
  309. [in] ULONG celt,
  310. [out] VARIANT *DevCap,
  311. [in,out,unique] ULONG *pceltFetched);
  312. [id(2), helpstring("Skips the next capability")]
  313. HRESULT Skip(
  314. [in] ULONG celt);
  315. [id(3), helpstring("Resets to first capability")]
  316. HRESULT Reset(void);
  317. [id(4), helpstring("Clone capability enumeration object, but returns the IEnumVARIANT interface")]
  318. HRESULT Clone(
  319. [out, retval] IEnumVARIANT **ppIEnum);
  320. }
  321. /*******************************************************************************
  322. *
  323. * C O M P O N E N T D E S C R I P T I O N S
  324. *
  325. *******************************************************************************/
  326. [
  327. uuid(0c131077-0088-11d2-87ea-0060081ed811),
  328. version(1.0),
  329. helpstring("WIA Type Library Dispatch")
  330. ]
  331. library WiaDevMgrDispatch
  332. {
  333. importlib("stdole32.tlb") ;
  334. // WIA Device Manager Dispatch
  335. [
  336. uuid(4b97598e-006e-11d2-87ea-0060081ed811),
  337. helpstring("WIA Device Manager Dispatch")
  338. ]
  339. coclass WiaDevMgrDispatch
  340. {
  341. [default] interface IWiaDevMgrDispatch;
  342. interface IEnumWiaDevInfoDispatch;
  343. interface IPropStorageDispatch;
  344. interface IWiaItemDispatch;
  345. interface IEnumWiaItemDispatch;
  346. interface IEnumStatPropStgDispatch;
  347. interface IEnumWiaDevCapsDispatch;
  348. };
  349. };