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.

1076 lines
35 KiB

  1. /******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORP., 1998-1999
  4. *
  5. * TITLE: WIA.idl
  6. *
  7. * VERSION: 2.0
  8. *
  9. * DATE: 6 Jan, 1998
  10. *
  11. * DESCRIPTION:
  12. * IDL source for WIA device manager. The MIDL compiler generates
  13. * marshaling code and a type library from this file.
  14. *
  15. ******************************************************************************/
  16. interface IWiaDevMgr;
  17. interface IWiaEventCallback;
  18. interface IWiaDataCallback;
  19. interface IWiaItem;
  20. interface IWiaPropertyStorage;
  21. interface IEnumWiaItem;
  22. interface IEnumWIA_DEV_INFO;
  23. interface IEnumWIA_DEV_CAPS;
  24. interface IEnumWIA_FORMAT_INFO;
  25. interface IStiDevice;
  26. import "unknwn.idl";
  27. import "oaidl.idl";
  28. import "propidl.idl";
  29. /*******************************************************************************
  30. *
  31. * Structures used by WIA
  32. *
  33. *******************************************************************************/
  34. //
  35. // Dither pattern specification structure used
  36. // with WIA_DPS_DITHER_PATTERN_DATA
  37. //
  38. typedef struct _WIA_DITHER_PATTERN_DATA
  39. {
  40. LONG lSize;
  41. BSTR bstrPatternName;
  42. LONG lPatternWidth;
  43. LONG lPatternLength;
  44. LONG cbPattern;
  45. [size_is(cbPattern)] BYTE *pbPattern;
  46. } WIA_DITHER_PATTERN_DATA, *PWIA_DITHER_PATTERN_DATA;
  47. typedef struct _WIA_PROPID_TO_NAME {
  48. PROPID propid;
  49. LPOLESTR pszName;
  50. } WIA_PROPID_TO_NAME, *PWIA_PROPID_TO_NAME;
  51. typedef struct _WIA_FORMAT_INFO
  52. {
  53. GUID guidFormatID;
  54. LONG lTymed;
  55. } WIA_FORMAT_INFO, *PWIA_FORMAT_INFO;
  56. /*******************************************************************************
  57. *
  58. * Import header file which contains WIA constants and globals
  59. *
  60. *******************************************************************************/
  61. cpp_quote("#include \"wiadef.h\"")
  62. /*******************************************************************************
  63. *
  64. * WIA Device Manager Interface
  65. *
  66. *******************************************************************************/
  67. [
  68. object,
  69. uuid(5eb2502a-8cf1-11d1-bf92-0060081ed811),
  70. helpstring("WIA Device Manager Interface"),
  71. pointer_default(unique)
  72. ]
  73. interface IWiaDevMgr : IUnknown
  74. {
  75. [helpstring("Create an WIA device information enumerator")]
  76. HRESULT EnumDeviceInfo(
  77. [in] LONG lFlag,
  78. [out, retval] IEnumWIA_DEV_INFO **ppIEnum);
  79. //
  80. // Creates/loads device.
  81. //
  82. [local]
  83. HRESULT CreateDevice(
  84. [in] BSTR bstrDeviceID,
  85. [out] IWiaItem **ppWiaItemRoot);
  86. [call_as(CreateDevice), helpstring("Create an WIA device object")]
  87. HRESULT LocalCreateDevice(
  88. [in] BSTR bstrDeviceID,
  89. [out] IWiaItem **ppWiaItemRoot);
  90. //
  91. // Creates/loads user selected device. Client side only call.
  92. //
  93. [local]
  94. HRESULT SelectDeviceDlg(
  95. [in] HWND hwndParent,
  96. [in] LONG lDeviceType,
  97. [in] LONG lFlags,
  98. [in,out] BSTR *pbstrDeviceID,
  99. [out,retval] IWiaItem **ppItemRoot);
  100. [call_as(SelectDeviceDlg), helpstring("Present UI to select then create an WIA device")]
  101. HRESULT LocalSelectDeviceDlg(
  102. [in] HWND hwndParent,
  103. [in] LONG lDeviceType,
  104. [in] LONG lFlags,
  105. [in,out] BSTR *pbstrDeviceID,
  106. [out, retval] IWiaItem **ppItemRoot);
  107. //
  108. // Returns the device ID of user selected device. Client side only call.
  109. //
  110. [local]
  111. HRESULT SelectDeviceDlgID(
  112. [in] HWND hwndParent,
  113. [in] LONG lDeviceType,
  114. [in] LONG lFlags,
  115. [out, retval] BSTR *pbstrDeviceID );
  116. [call_as(SelectDeviceDlgID), helpstring("Present UI to select then create an WIA device, returns BSTR")]
  117. HRESULT LocalSelectDeviceDlgID(
  118. [in] HWND hwndParent,
  119. [in] LONG lDeviceType,
  120. [in] LONG lFlags,
  121. [out, retval] BSTR *pbstrDeviceID );
  122. //
  123. // Creates/loads user selected device and gets image. Client side only call.
  124. //
  125. [local]
  126. HRESULT GetImageDlg(
  127. [in] HWND hwndParent,
  128. [in] LONG lDeviceType,
  129. [in] LONG lFlags,
  130. [in] LONG lIntent,
  131. [in] IWiaItem *pItemRoot,
  132. [in] BSTR bstrFilename,
  133. [in,out] GUID *pguidFormat);
  134. [call_as(GetImageDlg), helpstring("Get an image to file")]
  135. HRESULT LocalGetImageDlg(
  136. [in] HWND hwndParent,
  137. [in] LONG lDeviceType,
  138. [in] LONG lFlags,
  139. [in] LONG lIntent,
  140. [in] IWiaItem *pItemRoot,
  141. [in] BSTR bstrFilename,
  142. [in,out] GUID *pguidFormat);
  143. //
  144. // Event registration
  145. //
  146. [local]
  147. HRESULT RegisterEventCallbackProgram(
  148. [in] LONG lFlags,
  149. [in] BSTR bstrDeviceID,
  150. [in] const GUID *pEventGUID,
  151. [in] BSTR bstrCommandline,
  152. [in] BSTR bstrName,
  153. [in] BSTR bstrDescription,
  154. [in] BSTR bstrIcon);
  155. [call_as(RegisterEventCallbackProgram), helpstring("Register application launch")]
  156. HRESULT LocalRegisterEventCallbackProgram(
  157. [in] LONG lFlags,
  158. [in] BSTR bstrDeviceID,
  159. [in] const GUID *pEventGUID,
  160. [in] BSTR bstrCommandline,
  161. [in] BSTR bstrName,
  162. [in] BSTR bstrDescription,
  163. [in] BSTR bstrIcon);
  164. [helpstring("Registers a WIA Event Callback")]
  165. HRESULT RegisterEventCallbackInterface(
  166. [in] LONG lFlags,
  167. [in] BSTR bstrDeviceID,
  168. [in] const GUID *pEventGUID,
  169. [in,unique] IWiaEventCallback *pIWiaEventCallback,
  170. [out] IUnknown **pEventObject);
  171. [local]
  172. HRESULT RegisterEventCallbackCLSID(
  173. [in] LONG lFlags,
  174. [in] BSTR bstrDeviceID,
  175. [in] const GUID *pEventGUID,
  176. [in,unique] const GUID *pClsID,
  177. [in] BSTR bstrName,
  178. [in] BSTR bstrDescription,
  179. [in] BSTR bstrIcon);
  180. [call_as(RegisterEventCallbackCLSID), helpstring("Registers a WIA Event Callback via CLSID")]
  181. HRESULT LocalRegisterEventCallbackCLSID(
  182. [in] LONG lFlags,
  183. [in] BSTR bstrDeviceID,
  184. [in] const GUID *pEventGUID,
  185. [in,unique] const GUID *pClsID,
  186. [in] BSTR bstrName,
  187. [in] BSTR bstrDescription,
  188. [in] BSTR bstrIcon);
  189. //
  190. // add either a non-pnp local Wia device or a network device
  191. //
  192. [helpstring("Present UI to add a WIA device")]
  193. HRESULT AddDeviceDlg(
  194. [in] HWND hwndParent,
  195. [in] LONG lFlags);
  196. };
  197. /*******************************************************************************
  198. *
  199. * WIA Device Information Enumeration Interface
  200. *
  201. *******************************************************************************/
  202. [
  203. object,
  204. uuid(5e38b83c-8cf1-11d1-bf92-0060081ed811),
  205. helpstring("WIA Device Information Enumeration Interface"),
  206. pointer_default(unique)
  207. ]
  208. interface IEnumWIA_DEV_INFO : IUnknown
  209. {
  210. [local]
  211. HRESULT Next(
  212. [in] ULONG celt,
  213. [out,size_is(celt), length_is(*pceltFetched)] IWiaPropertyStorage **rgelt,
  214. [in,out,unique] ULONG* pceltFetched);
  215. [call_as(Next), helpstring("Gets the next device information IWiaPropertyStorage object")]
  216. HRESULT RemoteNext(
  217. [in] ULONG celt,
  218. [out,size_is(celt), length_is(*pceltFetched)] IWiaPropertyStorage **rgelt,
  219. [in,out,unique] ULONG* pceltFetched);
  220. [helpstring("Skips the next device information IWiaPropertyStorage object")]
  221. HRESULT Skip(
  222. [in] ULONG celt);
  223. [helpstring("Resets to first device information IWiaPropertyStorage object")]
  224. HRESULT Reset(void);
  225. [helpstring("Clones this IEnumWIA_DEV_INFO object")]
  226. HRESULT Clone(
  227. [out] IEnumWIA_DEV_INFO **ppIEnum);
  228. [helpstring("Returns the number of elements stored by this enumerator")]
  229. HRESULT GetCount(
  230. [out] ULONG *celt);
  231. }
  232. /**************************************************************************\
  233. *
  234. * IWiaEventCallback Interface
  235. *
  236. *
  237. *
  238. *
  239. *
  240. *
  241. * History:
  242. *
  243. * 2/11/1998
  244. *
  245. \**************************************************************************/
  246. [
  247. object,
  248. uuid(ae6287b0-0084-11d2-973b-00a0c9068f2e),
  249. helpstring("WIA Event callback"),
  250. pointer_default(unique)
  251. ]
  252. interface IWiaEventCallback : IUnknown
  253. {
  254. //
  255. // WIA event notification
  256. //
  257. HRESULT ImageEventCallback(
  258. [in] const GUID *pEventGUID,
  259. [in] BSTR bstrEventDescription,
  260. [in] BSTR bstrDeviceID,
  261. [in] BSTR bstrDeviceDescription,
  262. [in] DWORD dwDeviceType,
  263. [in] BSTR bstrFullItemName,
  264. [in, out] ULONG *pulEventType,
  265. [in] ULONG ulReserved);
  266. }
  267. /**************************************************************************\
  268. *
  269. * WIA_DATA_CALLBACK_HEADER
  270. *
  271. * lSize - size of this structure
  272. * lFormat - format of image
  273. * lBufferSize - size of buffer needed for complete data transfer
  274. * lPageCount - zero based count of total pages transfered
  275. *
  276. * History:
  277. *
  278. * 10/29/98
  279. *
  280. \**************************************************************************/
  281. typedef struct _WIA_DATA_CALLBACK_HEADER{
  282. LONG lSize;
  283. GUID guidFormatID;
  284. LONG lBufferSize;
  285. LONG lPageCount;
  286. }WIA_DATA_CALLBACK_HEADER,*PWIA_DATA_CALLBACK_HEADER;
  287. /**************************************************************************\
  288. *
  289. * IWiaDataCallback interface
  290. *
  291. *
  292. *
  293. *
  294. *
  295. * History:
  296. *
  297. * 10/29/1998 Original Version
  298. *
  299. \**************************************************************************/
  300. [
  301. object,
  302. uuid(a558a866-a5b0-11d2-a08f-00c04f72dc3c),
  303. helpstring("WIA data callback"),
  304. pointer_default(unique)
  305. ]
  306. interface IWiaDataCallback : IUnknown
  307. {
  308. //
  309. // image transfer status
  310. //
  311. [local]
  312. HRESULT BandedDataCallback(
  313. [in] LONG lMessage,
  314. [in] LONG lStatus,
  315. [in] LONG lPercentComplete,
  316. [in] LONG lOffset,
  317. [in] LONG lLength,
  318. [in] LONG lReserved,
  319. [in] LONG lResLength,
  320. [in,size_is(lResLength)] BYTE *pbBuffer);
  321. [call_as(BandedDataCallback) ,helpstring(" client data callback")]
  322. HRESULT RemoteBandedDataCallback(
  323. [in] LONG lMessage,
  324. [in] LONG lStatus,
  325. [in] LONG lPercentComplete,
  326. [in] LONG lOffset,
  327. [in] LONG lLength,
  328. [in] LONG lReserved,
  329. [in] LONG lResLength,
  330. [in,size_is(lResLength),unique] BYTE *pbBuffer);
  331. }
  332. /**************************************************************************\
  333. *
  334. * WIA_DATA_TRANSFER_INFO
  335. *
  336. * ulSize - Size of this structure
  337. * ulSection - Section provided by the client, otherwise NULL
  338. * ulBufferSize - Size of the buffer used in data transfer
  339. * bDoubleBuffer - Indicate whether the client want to use double buffer
  340. * ulReserved1 - Must be ZERO
  341. * ulReserved2 - Must be ZERO
  342. * History:
  343. *
  344. * 10/29/98
  345. *
  346. \**************************************************************************/
  347. typedef struct _WIA_DATA_TRANSFER_INFO {
  348. ULONG ulSize;
  349. ULONG ulSection;
  350. ULONG ulBufferSize;
  351. BOOL bDoubleBuffer;
  352. ULONG ulReserved1;
  353. ULONG ulReserved2;
  354. ULONG ulReserved3;
  355. } WIA_DATA_TRANSFER_INFO, *PWIA_DATA_TRANSFER_INFO;
  356. /**************************************************************************\
  357. *
  358. * WIA_EXTENDED_TRANSFER_INFO
  359. *
  360. * ulSize - Size of this structure.
  361. * ulMinBufferSize - Minimum size of buffer that can be requested.
  362. * ulOptimalBufferSize - The device's optimal buffer size.
  363. * ulMaxBufferSize - The maximum buffer size that can be requested.
  364. * ulNumBuffers - Number of buffers the server may use.
  365. *
  366. * History:
  367. *
  368. * 01/20/2000
  369. *
  370. \**************************************************************************/
  371. typedef struct _WIA_EXTENDED_TRANSFER_INFO {
  372. ULONG ulSize;
  373. ULONG ulMinBufferSize;
  374. ULONG ulOptimalBufferSize;
  375. ULONG ulMaxBufferSize;
  376. ULONG ulNumBuffers;
  377. } WIA_EXTENDED_TRANSFER_INFO, *PWIA_EXTENDED_TRANSFER_INFO;
  378. /**************************************************************************\
  379. *
  380. * IWiaDataTransfer - Interface to use shared memory to transfer an image
  381. *
  382. *
  383. *
  384. *
  385. *
  386. *
  387. *
  388. * History:
  389. *
  390. * 4/1/1998
  391. *
  392. \**************************************************************************/
  393. [
  394. object,
  395. uuid(a6cef998-a5b0-11d2-a08f-00c04f72dc3c),
  396. helpstring("WIA Data Transfer Interface"),
  397. pointer_default(unique)
  398. ]
  399. interface IWiaDataTransfer : IUnknown
  400. {
  401. [local]
  402. HRESULT idtGetData(
  403. [in,out] LPSTGMEDIUM pMedium,
  404. [in,unique] IWiaDataCallback *pIWiaDataCallback);
  405. [call_as(idtGetData), helpstring("IDataObject style data transfer with progress callback")]
  406. HRESULT idtGetDataEx(
  407. [in,out] LPSTGMEDIUM pMedium,
  408. [in,unique] IWiaDataCallback *pIWiaDataCallback);
  409. [local]
  410. HRESULT idtGetBandedData(
  411. [in,unique] PWIA_DATA_TRANSFER_INFO pWiaDataTransInfo,
  412. [in,unique] IWiaDataCallback *pIWiaDataCallback);
  413. [call_as(idtGetBandedData), helpstring("transfer image into a buffer")]
  414. HRESULT idtGetBandedDataEx(
  415. [in,unique] PWIA_DATA_TRANSFER_INFO pWiaDataTransInfo,
  416. [in,unique] IWiaDataCallback *pIWiaDataCallback);
  417. [helpstring("Check if format is supported")]
  418. HRESULT idtQueryGetData(
  419. [in,unique] WIA_FORMAT_INFO* pfe);
  420. [helpstring("Create format enumerator")]
  421. HRESULT idtEnumWIA_FORMAT_INFO(
  422. [out] IEnumWIA_FORMAT_INFO **ppEnum);
  423. [helpstring("Returns extended transfer information")]
  424. HRESULT idtGetExtendedTransferInfo(
  425. [out] PWIA_EXTENDED_TRANSFER_INFO pExtendedTransferInfo);
  426. }
  427. /*******************************************************************************
  428. *
  429. * IWiaItem Interface
  430. *
  431. *******************************************************************************/
  432. [
  433. object,
  434. uuid(4db1ad10-3391-11d2-9a33-00c04fa36145),
  435. helpstring("WIA Device Item Interface"),
  436. pointer_default(unique)
  437. ]
  438. interface IWiaItem : IUnknown
  439. {
  440. [helpstring("Get item type")]
  441. HRESULT GetItemType(
  442. [out] LONG *pItemType);
  443. [helpstring("Analyze an item")]
  444. HRESULT AnalyzeItem(
  445. [in] LONG lFlags);
  446. [helpstring("Get item enumerator")]
  447. HRESULT EnumChildItems(
  448. [out] IEnumWiaItem **ppIEnumWiaItem);
  449. [helpstring("Delete an item")]
  450. HRESULT DeleteItem(
  451. [in] LONG lFlags);
  452. [helpstring("Create a new child item")]
  453. HRESULT CreateChildItem(
  454. [in] LONG lFlags,
  455. [in] BSTR bstrItemName,
  456. [in] BSTR bstrFullItemName,
  457. [out] IWiaItem **ppIWiaItem);
  458. [helpstring("Enumerate event info")]
  459. HRESULT EnumRegisterEventInfo(
  460. [in] LONG lFlags,
  461. [in] const GUID *pEventGUID,
  462. [out] IEnumWIA_DEV_CAPS **ppIEnum);
  463. [helpstring("search for item by name")]
  464. HRESULT FindItemByName(
  465. [in] LONG lFlags,
  466. [in] BSTR bstrFullItemName,
  467. [out] IWiaItem **ppIWiaItem);
  468. // Client side only call.
  469. [local]
  470. HRESULT DeviceDlg(
  471. [in] HWND hwndParent,
  472. [in] LONG lFlags,
  473. [in] LONG lIntent,
  474. [out] LONG *plItemCount,
  475. [out] IWiaItem ***ppIWiaItem);
  476. [call_as(DeviceDlg), helpstring("Display device data acquistion UI")]
  477. HRESULT LocalDeviceDlg(
  478. [in] HWND hwndParent,
  479. [in] LONG lFlags,
  480. [in] LONG lIntent,
  481. [out] LONG *plItemCount,
  482. [out] IWiaItem ***pIWiaItem);
  483. [helpstring("Issue a device command")]
  484. HRESULT DeviceCommand(
  485. [in] LONG lFlags,
  486. [in] const GUID *pCmdGUID,
  487. [in, out] IWiaItem **pIWiaItem);
  488. [helpstring("Get device root item")]
  489. HRESULT GetRootItem(
  490. [out] IWiaItem **ppIWiaItem);
  491. [helpstring("Enumerate device events and commands")]
  492. HRESULT EnumDeviceCapabilities(
  493. [in] LONG lFlags,
  494. [out] IEnumWIA_DEV_CAPS **ppIEnumWIA_DEV_CAPS);
  495. [helpstring("Dump private item data, debug only")]
  496. HRESULT DumpItemData(
  497. [out] BSTR *bstrData);
  498. [helpstring("Dump private driver item data, debug only")]
  499. HRESULT DumpDrvItemData(
  500. [out] BSTR *bstrData);
  501. [helpstring("Dump private tree item data, debug only")]
  502. HRESULT DumpTreeItemData(
  503. [out] BSTR *bstrData);
  504. [helpstring("Diagnostic")]
  505. HRESULT Diagnostic(
  506. [in] ULONG ulSize,
  507. [in, size_is(ulSize)] BYTE *pBuffer);
  508. };
  509. /*******************************************************************************
  510. *
  511. * IWiaPropertyStorage Interface
  512. *
  513. *******************************************************************************/
  514. [
  515. object,
  516. uuid(98B5E8A0-29CC-491a-AAC0-E6DB4FDCCEB6),
  517. helpstring("WIA Property Storage Interface"),
  518. pointer_default(unique)
  519. ]
  520. interface IWiaPropertyStorage : IUnknown
  521. {
  522. /*
  523. * Should be inherited really
  524. */
  525. // When this IDL file is used for "IProp.dll" (the
  526. // standalone property set DLL), we must have local
  527. // and remotable routines (call_as routines are used
  528. // to remove BSTRs, which are not remotable with some
  529. // RPC run-times).
  530. //
  531. // For the remotable routines, we must use pointer
  532. // parameters (e.g. "*rgspec" rather than "rgspec[]")
  533. // so that the MIDL 2.0 compiler will generate an
  534. // interpereted proxy/stub, rather than inline.
  535. #ifdef IPROPERTY_DLL
  536. [local]
  537. #endif
  538. HRESULT ReadMultiple(
  539. [in] ULONG cpspec,
  540. [in, size_is(cpspec)]
  541. const PROPSPEC rgpspec[],
  542. [out, size_is(cpspec)]
  543. PROPVARIANT rgpropvar[]
  544. );
  545. #ifdef IPROPERTY_DLL
  546. [call_as(ReadMultiple)]
  547. HRESULT RemoteReadMultiple(
  548. [out] BOOL *pfBstrPresent,
  549. [in] ULONG cpspec,
  550. [in, size_is(cpspec)]
  551. const PROPSPEC *rgpspec,
  552. [out, size_is(cpspec)]
  553. PROPVARIANT *rgpropvar
  554. );
  555. #endif
  556. #ifdef IPROPERTY_DLL
  557. [local]
  558. #endif
  559. HRESULT WriteMultiple(
  560. [in] ULONG cpspec,
  561. [in, size_is(cpspec)]
  562. const PROPSPEC rgpspec[],
  563. [in, size_is(cpspec)]
  564. const PROPVARIANT rgpropvar[],
  565. [in] PROPID propidNameFirst
  566. );
  567. #ifdef IPROPERTY_DLL
  568. [call_as(WriteMultiple)]
  569. HRESULT RemoteWriteMultiple(
  570. [in] BOOL fBstrPresent,
  571. [in] ULONG cpspec,
  572. [in, size_is(cpspec)]
  573. const PROPSPEC *rgpspec,
  574. [in, size_is(cpspec)]
  575. const PROPVARIANT *rgpropvar,
  576. [in] PROPID propidNameFirst
  577. );
  578. #endif
  579. #ifdef IPROPERTY_DLL
  580. [local]
  581. #endif
  582. HRESULT DeleteMultiple(
  583. [in] ULONG cpspec,
  584. [in, size_is(cpspec)]
  585. const PROPSPEC rgpspec[]
  586. );
  587. #ifdef IPROPERTY_DLL
  588. [call_as(DeleteMultiple)]
  589. HRESULT RemoteDeleteMultiple(
  590. [in] ULONG cpspec,
  591. [in, size_is(cpspec)]
  592. const PROPSPEC *rgpspec
  593. );
  594. #endif
  595. HRESULT ReadPropertyNames(
  596. [in] ULONG cpropid,
  597. [in, size_is(cpropid)]
  598. const PROPID rgpropid[],
  599. [out, size_is(cpropid)]
  600. LPOLESTR rglpwstrName[]
  601. );
  602. HRESULT WritePropertyNames(
  603. [in] ULONG cpropid,
  604. [in, size_is(cpropid)]
  605. const PROPID rgpropid[],
  606. [in, size_is(cpropid)]
  607. const LPOLESTR rglpwstrName[]
  608. );
  609. HRESULT DeletePropertyNames(
  610. [in] ULONG cpropid,
  611. [in, size_is(cpropid)]
  612. const PROPID rgpropid[]
  613. );
  614. HRESULT Commit(
  615. [in] DWORD grfCommitFlags
  616. );
  617. HRESULT Revert();
  618. HRESULT Enum(
  619. [out] IEnumSTATPROPSTG ** ppenum
  620. );
  621. HRESULT SetTimes(
  622. [in] FILETIME const * pctime,
  623. [in] FILETIME const * patime,
  624. [in] FILETIME const * pmtime
  625. );
  626. HRESULT SetClass(
  627. [in] REFCLSID clsid
  628. );
  629. HRESULT Stat(
  630. [out] STATPROPSETSTG * pstatpsstg
  631. );
  632. /*
  633. *=====================================================================*
  634. */
  635. [helpstring("Get property attribute information.")]
  636. HRESULT GetPropertyAttributes(
  637. [in] ULONG cpspec,
  638. [in, size_is(cpspec)] PROPSPEC rgpspec[],
  639. [out, size_is(cpspec)] ULONG rgflags[],
  640. [out, size_is(cpspec)] PROPVARIANT rgpropvar[]);
  641. [helpstring("Returns the current number of properties in this property storage.")]
  642. HRESULT GetCount(
  643. [out] ULONG *pulNumProps);
  644. [helpstring("Get an items property stream")]
  645. HRESULT GetPropertyStream(
  646. [out] GUID *pCompatibilityId,
  647. [out] IStream **ppIStream);
  648. [helpstring("Set an items property stream")]
  649. HRESULT SetPropertyStream(
  650. [in] GUID *pCompatibilityId,
  651. [in, unique] IStream *pIStream);
  652. };
  653. /*******************************************************************************
  654. *
  655. * IEnumWiaItem Interface
  656. *
  657. *******************************************************************************/
  658. [
  659. object,
  660. uuid(5e8383fc-3391-11d2-9a33-00c04fa36145),
  661. helpstring("WIA Device Class Item Enumeration Interface"),
  662. pointer_default(unique)
  663. ]
  664. interface IEnumWiaItem : IUnknown
  665. {
  666. [local]
  667. HRESULT Next(
  668. [in] ULONG celt,
  669. [out, size_is(celt), length_is(*pceltFetched)] IWiaItem **ppIWiaItem,
  670. [in, out, unique] ULONG *pceltFetched);
  671. [call_as(Next), helpstring("Gets the next IWiaItem object")]
  672. HRESULT RemoteNext(
  673. [in] ULONG celt,
  674. [out, size_is(celt), length_is(*pceltFetched)] IWiaItem **ppIWiaItem,
  675. [in, out, unique] ULONG *pceltFetched);
  676. [helpstring("Skips the next IWiaItem object")]
  677. HRESULT Skip(
  678. [in] ULONG celt);
  679. [helpstring("Resets to first IWiaItem object")]
  680. HRESULT Reset(void);
  681. [helpstring("Clone IEnumWiaItem object")]
  682. HRESULT Clone(
  683. [out] IEnumWiaItem **ppIEnum);
  684. [helpstring("Returns the number of elements stored by this enumerator")]
  685. HRESULT GetCount(
  686. [out] ULONG *celt);
  687. }
  688. /*******************************************************************************
  689. *
  690. * WIA_DEV_CAP
  691. *
  692. * WIA_DEV_CAP structure returns event and command information
  693. * for the IEnumWIA_DEV_CAPS Interface
  694. *
  695. *******************************************************************************/
  696. typedef struct _WIA_DEV_CAP {
  697. GUID guid;
  698. ULONG ulFlags; // Indicate the handler is default, etc
  699. BSTR bstrName;
  700. BSTR bstrDescription;
  701. BSTR bstrIcon;
  702. BSTR bstrCommandline;
  703. } WIA_DEV_CAP, *PWIA_DEV_CAP, WIA_EVENT_HANDLER, *PWIA_EVENT_HANDLER;
  704. /*******************************************************************************
  705. *
  706. * IEnumWIA_DEV_CAPS Interface
  707. *
  708. *******************************************************************************/
  709. [
  710. object,
  711. uuid(1fcc4287-aca6-11d2-a093-00c04f72dc3c),
  712. helpstring("WIA_DEV_CAPS Enumeration Interface"),
  713. pointer_default(unique)
  714. ]
  715. interface IEnumWIA_DEV_CAPS : IUnknown
  716. {
  717. [local]
  718. HRESULT Next(
  719. [in] ULONG celt,
  720. [out, size_is(celt), length_is(*pceltFetched)] WIA_DEV_CAP *rgelt,
  721. [in,out,unique] ULONG *pceltFetched);
  722. [call_as(Next), helpstring("Gets the next WIA_DEV_CAPS")]
  723. HRESULT RemoteNext(
  724. [in] ULONG celt,
  725. [out, size_is(celt), length_is(*pceltFetched)] WIA_DEV_CAP *rgelt,
  726. [in,out,unique] ULONG *pceltFetched);
  727. [helpstring("Skips the next WIA_DEV_CAPS")]
  728. HRESULT Skip(
  729. [in] ULONG celt);
  730. [helpstring("Resets to first WIA_DEV_CAPS")]
  731. HRESULT Reset(void);
  732. [helpstring("Clone IEnumWIA_DEV_CAPS object")]
  733. HRESULT Clone(
  734. [out] IEnumWIA_DEV_CAPS **ppIEnum);
  735. [helpstring("Returns the number of elements stored by this enumerator")]
  736. HRESULT GetCount(
  737. [out] ULONG *pcelt);
  738. }
  739. /*******************************************************************************
  740. *
  741. * IEnumWIA_FORMAT_INF Interface
  742. *
  743. *******************************************************************************/
  744. [
  745. object,
  746. uuid(81BEFC5B-656D-44f1-B24C-D41D51B4DC81),
  747. helpstring("WIA_FORMAT_INFO Enumeration Interface"),
  748. pointer_default(unique)
  749. ]
  750. interface IEnumWIA_FORMAT_INFO : IUnknown
  751. {
  752. [local]
  753. HRESULT Next(
  754. [in] ULONG celt,
  755. [out, size_is(celt), length_is(*pceltFetched)] WIA_FORMAT_INFO *rgelt,
  756. [in,out,unique] ULONG *pceltFetched);
  757. [call_as(Next), helpstring("Gets the next WIA_FORMAT_INFO")]
  758. HRESULT RemoteNext(
  759. [in] ULONG celt,
  760. [out, size_is(celt), length_is(*pceltFetched)] WIA_FORMAT_INFO *rgelt,
  761. [in,out,unique] ULONG *pceltFetched);
  762. [helpstring("Skips the next WIA_FORMAT_INFO")]
  763. HRESULT Skip(
  764. [in] ULONG celt);
  765. [helpstring("Resets to first WIA_FORMAT_INFO")]
  766. HRESULT Reset(void);
  767. [helpstring("Clone IEnumWIA_FORMAT_INFO object")]
  768. HRESULT Clone(
  769. [out] IEnumWIA_FORMAT_INFO **ppIEnum);
  770. [helpstring("Returns the number of elements stored by this enumerator")]
  771. HRESULT GetCount(
  772. [out] ULONG *pcelt);
  773. }
  774. /*******************************************************************************
  775. *
  776. * WIA Logging Interface
  777. *
  778. *******************************************************************************/
  779. [
  780. object,
  781. uuid(A00C10B6-82A1-452f-8B6C-86062AAD6890),
  782. helpstring("WIA Logging Interface"),
  783. pointer_default(unique)
  784. ]
  785. interface IWiaLog : IUnknown
  786. {
  787. [helpstring("Initialize Logging object")]
  788. HRESULT InitializeLog(
  789. [in] LONG hInstance);
  790. [helpstring("Write ERRROR Information to log file, Translating HRESULT to error string")]
  791. HRESULT hResult(
  792. [in] HRESULT hResult);
  793. [helpstring("Write TRACE,ERROR,WARNING, etc.. Information to log file, using service Resource ID")]
  794. HRESULT Log(
  795. [in] LONG lFlags,
  796. [in] LONG lResID,
  797. [in] LONG lDetail,
  798. [in] BSTR bstrText);
  799. };
  800. /*******************************************************************************
  801. *
  802. * WIA Extended Logging Interface
  803. *
  804. *******************************************************************************/
  805. [
  806. object,
  807. uuid(AF1F22AC-7A40-4787-B421-AEb47A1FBD0B),
  808. helpstring("WIA (Extended) Logging Interface"),
  809. pointer_default(unique)
  810. ]
  811. interface IWiaLogEx : IUnknown
  812. {
  813. [helpstring("Initialize Logging object")]
  814. HRESULT InitializeLogEx(
  815. [in] BYTE *hInstance);
  816. [helpstring("Write ERRROR Information to log file, Translating HRESULT to error string")]
  817. HRESULT hResult(
  818. [in] HRESULT hResult);
  819. [helpstring("Write information to log - compatible with IWiaLog::Log(...)")]
  820. HRESULT Log(
  821. [in] LONG lFlags,
  822. [in] LONG lResID,
  823. [in] LONG lDetail,
  824. [in] BSTR bstrText);
  825. [helpstring("Write ERRROR Information to log file, Translating HRESULT to error string")]
  826. HRESULT hResultEx(
  827. [in] LONG lMethodId,
  828. [in] HRESULT hResult);
  829. [helpstring("Write TRACE,ERROR,WARNING, etc.. Information to log file, using service Resource ID")]
  830. HRESULT LogEx(
  831. [in] LONG lMethodId,
  832. [in] LONG lFlags,
  833. [in] LONG lResID,
  834. [in] LONG lDetail,
  835. [in] BSTR bstrText);
  836. };
  837. /*******************************************************************************
  838. *
  839. * WiaDevMgr General Notification Interface
  840. *
  841. *******************************************************************************/
  842. [
  843. object,
  844. uuid(70681EA0-E7BF-4291-9FB1-4E8813A3F78E),
  845. helpstring("WiaDevMgr Notification Interface"),
  846. pointer_default(unique)
  847. ]
  848. interface IWiaNotifyDevMgr : IUnknown
  849. {
  850. [helpstring("Notify of new device arrival")]
  851. HRESULT NewDeviceArrival();
  852. };
  853. [
  854. object,
  855. uuid(6291ef2c-36ef-4532-876a-8e132593778d),
  856. helpstring("WIA Item extras interface"),
  857. pointer_default(unique)
  858. ]
  859. interface IWiaItemExtras : IUnknown
  860. {
  861. [helpstring("Retrieve extended error string")]
  862. HRESULT GetExtendedErrorInfo([out] BSTR *bstrErrorText);
  863. [helpstring("Escape to driver")]
  864. HRESULT Escape([in] DWORD dwEscapeCode,
  865. [in, size_is(cbInDataSize)] BYTE * lpInData,
  866. [in] DWORD cbInDataSize,
  867. [out, size_is(dwOutDataSize), length_is((pdwActualDataSize) ? *pdwActualDataSize : dwOutDataSize)] BYTE * pOutData,
  868. [in] DWORD dwOutDataSize,
  869. [out] DWORD *pdwActualDataSize);
  870. [helpstring("Cancel pending IO")]
  871. HRESULT CancelPendingIO();
  872. }
  873. /*******************************************************************************
  874. *
  875. * C O M P O N E N T D E S C R I P T I O N S
  876. *
  877. *******************************************************************************/
  878. [
  879. uuid(99f74582-8cf1-11d1-bf92-0060081ed811),
  880. version(1.0),
  881. helpstring("WIA Type Library")
  882. ]
  883. library WiaDevMgr
  884. {
  885. importlib("stdole32.tlb") ;
  886. // WIA Device Manager
  887. [
  888. uuid(a1f4e726-8cf1-11d1-bf92-0060081ed811),
  889. helpstring("WIA Device Manager")
  890. ]
  891. coclass WiaDevMgr
  892. {
  893. [default] interface IWiaDevMgr;
  894. };
  895. // WIA Logging
  896. [
  897. uuid(A1E75357-881A-419e-83E2-BB16DB197C68),
  898. helpstring("WIA Logging")
  899. ]
  900. coclass WiaLog
  901. {
  902. interface IWiaLog;
  903. };
  904. };