From: Biswapriyo Nath nathbappai@gmail.com
Required for https://github.com/msys2/MINGW-packages/issues/17451 --- include/wia_lh.idl | 262 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 262 insertions(+)
diff --git a/include/wia_lh.idl b/include/wia_lh.idl index 2e3ecf44945..ef0d2d4f0c6 100644 --- a/include/wia_lh.idl +++ b/include/wia_lh.idl @@ -26,6 +26,12 @@ interface IEnumWIA_DEV_INFO; interface IWiaPropertyStorage; interface IWiaItem; interface IWiaEventCallback; +interface IEnumWIA_DEV_CAPS; +interface IWiaTransferCallback; +interface IWiaPreview; +interface IEnumWiaItem2; +interface IWiaItem2; +interface IWiaDevMgr2;
cpp_quote("DEFINE_GUID(CLSID_WiaDevMgr, 0xa1f4e726,0x8cf1,0x11d1,0xbf,0x92,0x00,0x60,0x08,0x1e,0xd8,0x11);")
@@ -156,3 +162,259 @@ interface IWiaEventCallback : IUnknown [in,out] ULONG *pulEventType, [in] ULONG ulReserved); } + +typedef struct _WIA_DEV_CAP +{ + GUID guid; + ULONG ulFlags; + BSTR bstrName; + BSTR bstrDescription; + BSTR bstrIcon; + BSTR bstrCommandline; +} WIA_DEV_CAP, *PWIA_DEV_CAP, WIA_EVENT_HANDLER, *PWIA_EVENT_HANDLER; + +[ + object, + uuid(1fcc4287-aca6-11d2-a093-00c04f72dc3c) +] +interface IEnumWIA_DEV_CAPS : IUnknown +{ + HRESULT Next( + [in] ULONG celt, + [out, size_is(celt), length_is(*pceltFetched)] WIA_DEV_CAP *rgelt, + [in, out, unique] ULONG *pceltFetched); + + HRESULT Skip( + [in] ULONG celt); + + HRESULT Reset(void); + + HRESULT Clone( + [out] IEnumWIA_DEV_CAPS **ppIEnum); + + HRESULT GetCount( + [out] ULONG *pcelt); +} + +typedef struct _WiaTransferParams +{ + LONG lMessage; + LONG lPercentComplete; + ULONG64 ulTransferredBytes; + HRESULT hrErrorStatus; +} WiaTransferParams; + +[ + object, + uuid(27d4eaaf-28a6-4ca5-9aab-e678168b9527) +] +interface IWiaTransferCallback : IUnknown +{ + HRESULT TransferCallback( + [in] LONG lFlags, + [in] WiaTransferParams *pWiaTransferParams); + + HRESULT GetNextStream( + [in] LONG lFlags, + [in] BSTR bstrItemName, + [in] BSTR bstrFullItemName, + [out] IStream **ppDestination); +} + +[ + object, + uuid(95c2b4fd-33f2-4d86-ad40-9431f0df08f7) +] +interface IWiaPreview : IUnknown +{ + HRESULT GetNewPreview( + [in] LONG lFlags, + [in] IWiaItem2 *pWiaItem2, + [in] IWiaTransferCallback *pWiaTransferCallback); + + HRESULT UpdatePreview( + [in] LONG lFlags, + [in] IWiaItem2 *pChildWiaItem2, + [in] IWiaTransferCallback *pWiaTransferCallback); + + HRESULT DetectRegions( + [in] LONG lFlags); + + HRESULT Clear(void); +} + +[ + object, + uuid(59970af4-cd0d-44d9-ab24-52295630e582) +] +interface IEnumWiaItem2 : IUnknown +{ + HRESULT Next( + [in] ULONG cElt, + [out, size_is(cElt), length_is(*pcEltFetched)] IWiaItem2 **ppIWiaItem2, + [in, out, unique] ULONG *pcEltFetched); + + HRESULT Skip( + [in] ULONG cElt); + + HRESULT Reset(void); + + HRESULT Clone( + [out] IEnumWiaItem2 **ppIEnum); + + HRESULT GetCount( + [out] ULONG *cElt); +} + +[ + object, + uuid(6cba0075-1287-407d-9b77-cf0e030435cc) +] +interface IWiaItem2 : IUnknown +{ + HRESULT CreateChildItem( + [in] LONG lItemFlags, + [in] LONG lCreationFlags, + [in] BSTR bstrItemName, + [out] IWiaItem2 **ppIWiaItem2); + + HRESULT DeleteItem( + [in] LONG lFlags); + + HRESULT EnumChildItems( + [in, unique] const GUID *pCategoryGUID, + [out] IEnumWiaItem2 **ppIEnumWiaItem2); + + HRESULT FindItemByName( + [in] LONG lFlags, + [in] BSTR bstrFullItemName, + [out] IWiaItem2 **ppIWiaItem2); + + HRESULT GetItemCategory( + [out] GUID *pItemCategoryGUID); + + HRESULT GetItemType( + [out] LONG *pItemType); + + HRESULT DeviceDlg( + [in] LONG lFlags, + [in] HWND hwndParent, + [in] BSTR bstrFolderName, + [in] BSTR bstrFilename, + [out] LONG *plNumFiles, + [out, size_is(*plNumFiles)] BSTR **ppbstrFilePaths, + [in, out, optional] IWiaItem2 **ppItem); + + HRESULT DeviceCommand( + [in] LONG lFlags, + [in] const GUID *pCmdGUID, + [in, out] IWiaItem2 **ppIWiaItem2); + + HRESULT EnumDeviceCapabilities( + [in] LONG lFlags, + [out] IEnumWIA_DEV_CAPS **ppIEnumWIA_DEV_CAPS); + + HRESULT CheckExtension( + [in] LONG lFlags, + [in] BSTR bstrName, + [in] REFIID riidExtensionInterface, + [out] BOOL *pbExtensionExists); + + HRESULT GetExtension( + [in] LONG lFlags, + [in] BSTR bstrName, + [in] REFIID riidExtensionInterface, + [out, iid_is(riidExtensionInterface)] void **ppOut); + + HRESULT GetParentItem( + [out] IWiaItem2 **ppIWiaItem2); + + HRESULT GetRootItem( + [out] IWiaItem2 **ppIWiaItem2); + + HRESULT GetPreviewComponent( + [in] LONG lFlags, + [out] IWiaPreview **ppWiaPreview); + + HRESULT EnumRegisterEventInfo( + [in] LONG lFlags, + [in] const GUID *pEventGUID, + [out] IEnumWIA_DEV_CAPS **ppIEnum); + + HRESULT Diagnostic( + [in] ULONG ulSize, + [in, size_is(ulSize)] BYTE *pBuffer); +} + +[ + object, + uuid(79c07cf1-cbdd-41ee-8ec3-f00080cada7a) +] +interface IWiaDevMgr2 : IUnknown +{ + HRESULT EnumDeviceInfo( + [in] LONG lFlags, + [out, retval] IEnumWIA_DEV_INFO **ppIEnum); + + HRESULT CreateDevice( + [in] LONG lFlags, + [in] BSTR bstrDeviceID, + [out] IWiaItem2 **ppWiaItem2Root); + + HRESULT SelectDeviceDlg( + [in] HWND hwndParent, + [in] LONG lDeviceType, + [in] LONG lFlags, + [in, out] BSTR *pbstrDeviceID, + [out, retval] IWiaItem2 **ppItemRoot); + + HRESULT SelectDeviceDlgID( + [in] HWND hwndParent, + [in] LONG lDeviceType, + [in] LONG lFlags, + [out, retval] BSTR *pbstrDeviceID); + + HRESULT RegisterEventCallbackInterface( + [in] LONG lFlags, + [in] BSTR bstrDeviceID, + [in] const GUID *pEventGUID, + [in, unique] IWiaEventCallback *pIWiaEventCallback, + [out] IUnknown **pEventObject); + + HRESULT RegisterEventCallbackProgram( + [in] LONG lFlags, + [in] BSTR bstrDeviceID, + [in] const GUID *pEventGUID, + [in] BSTR bstrFullAppName, + [in] BSTR bstrCommandLineArg, + [in] BSTR bstrName, + [in] BSTR bstrDescription, + [in] BSTR bstrIcon); + + HRESULT RegisterEventCallbackCLSID( + [in] LONG lFlags, + [in] BSTR bstrDeviceID, + [in] const GUID *pEventGUID, + [in, unique] const GUID *pClsID, + [in] BSTR bstrName, + [in] BSTR bstrDescription, + [in] BSTR bstrIcon); + + HRESULT GetImageDlg( + [in] LONG lFlags, + [in] BSTR bstrDeviceID, + [in] HWND hwndParent, + [in] BSTR bstrFolderName, + [in] BSTR bstrFilename, + [out] LONG *plNumFiles, + [out, size_is(*plNumFiles)] BSTR **ppbstrFilePaths, + [in, out] IWiaItem2 **ppItem); +} + +[ + uuid(b6c292bc-7c88-41ee-8b54-8ec92617e599) +] +coclass WiaDevMgr2 +{ + interface IWiaDevMgr2; +}