|
|
/**************************************************************************** * * (C) COPYRIGHT 1998-2000, MICROSOFT CORP. * * FILE: wiamindr.idl * * VERSION: 2.0 * * DATE: 8/28/1998 * * DESCRIPTION: * IDL source for the WIA mini driver. * *****************************************************************************/
interface IWiaMiniDrv; interface IWiaMiniDrvCallBack; interface IWiaDrvItem; interface IWiaItem; interface IWiaPropertyStorage;
import "unknwn.idl"; import "oaidl.idl"; import "propidl.idl"; import "wia.idl";
/**************************************************************************\ * * MINIDRV_TRANSFER_CONTEXT - Minidriver data transfer context * \**************************************************************************/
typedef struct _MINIDRV_TRANSFER_CONTEXT{ LONG lSize; LONG lWidthInPixels; LONG lLines; LONG lDepth; LONG lXRes; LONG lYRes; LONG lCompression; GUID guidFormatID; LONG tymed; LONG hFile; LONG cbOffset; LONG lBufferSize; LONG lActiveBuffer; LONG lNumBuffers; BYTE *pBaseBuffer; BYTE *pTransferBuffer; BOOL bTransferDataCB; BOOL bClassDrvAllocBuf; LONG lClientAddress; IWiaMiniDrvCallBack *pIWiaMiniDrvCallBack; LONG lImageSize; LONG lHeaderSize; LONG lItemSize; LONG cbWidthInBytes; LONG lPage; LONG lCurIfdOffset; LONG lPrevIfdOffset; } MINIDRV_TRANSFER_CONTEXT, *PMINIDRV_TRANSFER_CONTEXT;
/******************************************************************************* * * WIA_DEV_CAP_DRV - Device capabilities * *******************************************************************************/
typedef struct _WIA_DEV_CAP_DRV { GUID *guid; ULONG ulFlags; LPOLESTR wszName; LPOLESTR wszDescription; LPOLESTR wszIcon; } WIA_DEV_CAP_DRV,*PWIA_DEV_CAP_DRV;
/******************************************************************************* * * IWiaMiniDrvItem interface * *******************************************************************************/
[ object, uuid(d8cdee14-3c6c-11d2-9a35-00c04fa36145), helpstring("WIA Mini Driver Interface"), pointer_default(unique) ]
interface IWiaMiniDrv : IUnknown { [helpstring("Initialize WIA, build item tree, etc")] HRESULT drvInitializeWia( [in] BYTE*, [in] LONG, [in] BSTR, [in] BSTR, [in] IUnknown*, [in] IUnknown*, [out] IWiaDrvItem**, [out] IUnknown**, [out] LONG*); [helpstring("Acquire data from the device item")] HRESULT drvAcquireItemData( [in] BYTE*, [in] LONG, [in, out] PMINIDRV_TRANSFER_CONTEXT, [out] LONG*);
[helpstring("Initialize the device item properties")] HRESULT drvInitItemProperties( [in] BYTE*, [in] LONG, [out] LONG*);
[helpstring("Mini driver validatation of the device item properties")] HRESULT drvValidateItemProperties( [in] BYTE*, [in] LONG, [in] ULONG, [in] const PROPSPEC*, [out] LONG*);
[helpstring("Mini driver write of the device item properties")] HRESULT drvWriteItemProperties( [in] BYTE*, [in] LONG, [in] PMINIDRV_TRANSFER_CONTEXT, [out] LONG*); [helpstring("Mini driver read of the device item properties")] HRESULT drvReadItemProperties( [in] BYTE*, [in] LONG, [in] ULONG, [in] const PROPSPEC*, [out] LONG*);
[helpstring("Lock Device")] HRESULT drvLockWiaDevice( [in] BYTE*, [in] LONG, [out] LONG*);
[helpstring("UnLock Device")] HRESULT drvUnLockWiaDevice( [in] BYTE*, [in] LONG, [out] LONG*);
[helpstring("Look at item and create sub-items if needed")] HRESULT drvAnalyzeItem( [in] BYTE*, [in] LONG, [in] LONG*);
[helpstring("Map a device error value to a string")] HRESULT drvGetDeviceErrorStr( [in] LONG, [in] LONG, [out] LPOLESTR*, [out] LONG*); [helpstring("Issue a device command")] HRESULT drvDeviceCommand( [in] BYTE*, [in] LONG, [in] const GUID*, [out] IWiaDrvItem**, [out] LONG*);
[helpstring("Get the device capabilities")] HRESULT drvGetCapabilities( [in] BYTE*, [in] LONG, [out] LONG*, [out] WIA_DEV_CAP_DRV**, [out] LONG*); [helpstring("Delete the item from the device")] HRESULT drvDeleteItem( [in] BYTE*, [in] LONG, [out] LONG*);
[helpstring("Free driver item context")] HRESULT drvFreeDrvItemContext( [in] LONG, [in] BYTE*, [out] LONG*);
[helpstring("Get the FORMAT and TYMED")] HRESULT drvGetWiaFormatInfo( [in] BYTE*, [in] LONG, [out] LONG*, [out] WIA_FORMAT_INFO**, [out] LONG*);
[helpstring("Notify Pnp event received by device manager")] HRESULT drvNotifyPnpEvent( [in] const GUID *pEventGUID, [in] BSTR bstrDeviceID, [in] ULONG ulReserved);
[helpstring("UnInitialize WIA, remove resources attached to item, etc")] HRESULT drvUnInitializeWia( [in] BYTE*); };
/******************************************************************************* * * IWiaMiniDrvCallBack interface * *******************************************************************************/
[ object, uuid(33a57d5a-3de8-11d2-9a36-00c04fa36145), helpstring("WIA Mini Driver Call Back Interface"), pointer_default(unique) ]
interface IWiaMiniDrvCallBack : IUnknown { [id(1), helpstring("Acquire data from the device")] HRESULT MiniDrvCallback( [in] LONG lReason, [in] LONG lStatus, [in] LONG lPercentComplete, [in] LONG lOffset, [in] LONG lLength, [in] PMINIDRV_TRANSFER_CONTEXT pTranCtx, [in] LONG lReserved); };
/**************************************************************************\ * * IWiaDrvItem interface * \**************************************************************************/
[ object, uuid(1f02b5c5-b00c-11d2-a094-00c04f72dc3c), helpstring("WIA Mini Driver DrvItem Interface"), pointer_default(unique) ] interface IWiaDrvItem : IUnknown { HRESULT GetItemFlags( [out] LONG*); HRESULT GetDeviceSpecContext( [out] BYTE**);
HRESULT GetFullItemName( [out] BSTR*);
HRESULT GetItemName( [out] BSTR*);
HRESULT AddItemToFolder( [in] IWiaDrvItem*); HRESULT UnlinkItemTree( [in] LONG);
HRESULT RemoveItemFromFolder( [in] LONG); HRESULT FindItemByName( [in] LONG, [in] BSTR, [out] IWiaDrvItem**);
HRESULT FindChildItemByName( [in] BSTR, [out] IWiaDrvItem**);
HRESULT GetParentItem( [out] IWiaDrvItem**);
HRESULT GetFirstChildItem( [out] IWiaDrvItem**);
HRESULT GetNextSiblingItem( [out] IWiaDrvItem**);
HRESULT DumpItemData( [out] BSTR*); };
/******************************************************************************* * * WIA_PROPERTY_INFO - Stores default access and valid values for item properties * *******************************************************************************/
typedef struct _WIA_PROPERTY_INFO { ULONG lAccessFlags; VARTYPE vt;
union {
struct { LONG Min; LONG Nom; LONG Max; LONG Inc; } Range; struct { DOUBLE Min; DOUBLE Nom; DOUBLE Max; DOUBLE Inc; } RangeFloat; struct { LONG cNumList; LONG Nom; BYTE *pList; } List; struct { LONG cNumList; DOUBLE Nom; BYTE *pList; } ListFloat;
struct { LONG cNumList; GUID Nom; GUID *pList; } ListGuid; struct { LONG cNumList; BSTR Nom; BSTR *pList; } ListBStr; struct { LONG Nom; LONG ValidBits; } Flag;
struct { LONG Dummy; } None;
} ValidVal;
}WIA_PROPERTY_INFO, *PWIA_PROPERTY_INFO;
/******************************************************************************* * * WIA_PROPERTY_CONTEXT - Stores property id and flag indicating whether the * application is changing the property * *******************************************************************************/
typedef struct _WIA_PROPERTY_CONTEXT{ ULONG cProps; PROPID *pProps; BOOL *pChanged; } WIA_PROPERTY_CONTEXT, *PWIA_PROPERTY_CONTEXT;
/******************************************************************************* * * WIAS_CHANGED_VALUE_INFO - Stores current and previous values for a property * *******************************************************************************/
typedef struct _WIAS_CHANGED_VALUE_INFO{ BOOL bChanged; LONG vt; union { LONG lVal; FLOAT fltVal; BSTR bstrVal; GUID guidVal; } Old; union { LONG lVal; FLOAT fltVal; BSTR bstrVal; GUID guidVal; } Current; } WIAS_CHANGED_VALUE_INFO, *PWIAS_CHANGED_VALUE_INFO;
/******************************************************************************* * * WIAS_DOWN_SAMPLE_INFO - Used by wiasDownSampleBuffer * *******************************************************************************/
typedef struct _WIAS_DOWN_SAMPLE_INFO { ULONG ulOriginalWidth; ULONG ulOriginalHeight; ULONG ulBitsPerPixel; ULONG ulXRes; ULONG ulYRes; ULONG ulDownSampledWidth; ULONG ulDownSampledHeight; ULONG ulActualSize; ULONG ulDestBufSize; ULONG ulSrcBufSize; BYTE *pSrcBuffer; BYTE *pDestBuffer; } WIAS_DOWN_SAMPLE_INFO, *PWIAS_DOWN_SAMPLE_INFO;
/******************************************************************************* * * WIAS_ENDORSER_VALUE - Stores endorser strings * *******************************************************************************/ typedef struct _WIAS_ENDORSER_VALUE { LPWSTR wszTokenName; LPWSTR wszValue; } WIAS_ENDORSER_VALUE, *PWIAS_ENDORSER_VALUE;
/******************************************************************************* * * WIAS_ENDORSER_INFO - Stores token/value pairs for endorser * *******************************************************************************/ typedef struct _WIAS_ENDORSER_INFO { ULONG ulPageCount; ULONG ulNumEndorserValues; WIAS_ENDORSER_VALUE *pEndorserValues; } WIAS_ENDORSER_INFO, *PWIAS_ENDORSER_INFO;
cpp_quote("#include \"wiamdef.h\"")
|