IWiaMiniDrv::drvGetWiaFormatInfo method (wiamindr_lh.h)
The IWiaMiniDrv::drvGetWiaFormatInfo method finds the image formats and media types that the WIA hardware device supports.
Syntax
HRESULT drvGetWiaFormatInfo(
BYTE *__MIDL__IWiaMiniDrv0059,
LONG __MIDL__IWiaMiniDrv0060,
LONG *__MIDL__IWiaMiniDrv0061,
WIA_FORMAT_INFO **__MIDL__IWiaMiniDrv0062,
LONG *__MIDL__IWiaMiniDrv0063
);
Parameters
__MIDL__IWiaMiniDrv0059
lFlags [in]
Reserved.
__MIDL__IWiaMiniDrv0060
pWiasContext [in]
Pointer to a WIA item context.
__MIDL__IWiaMiniDrv0061
pcelt [out]
Points to a memory location that will receive the number of items in the array pointed to by ppwfi.
__MIDL__IWiaMiniDrv0062
plDevErrVal [out]
Points to a memory location that will receive a status code for this method. If this method returns S_OK, the value stored will be zero. Otherwise, a minidriver-specific error code will be stored at the location pointed to by this parameter.
__MIDL__IWiaMiniDrv0063
ppwfi [out, optional]
Points to a memory location that will receive the address of the first element of an array of WIA_FORMAT_INFO structures.
Return value
On success, the method should return S_OK and clear the device error value pointed to by plDevErrVal. If this method is called for items that do not contain any data, it should return E_INVALIDARG. If the method fails, it should return a standard COM error code and place a minidriver-specific error code value in the memory pointed to by plDevErrVal.
The value pointed to by plDevErrVal can be converted to a string by calling IWiaMiniDrv::drvGetDeviceErrorStr.
Remarks
This method creates an array of WIA_FORMAT_INFO structures that describe the media types and image formats that the WIA hardware device supports. For each element in the array, the media type can be one of TYMED_CALLBACK, TYMED_MULTIPAGE_CALLBACK, TYMED_FILE, or TYMED_MULTIPAGE_FILE. Typical values for the image format include WiaImgFmt_JPEG, and WiaImgFmt_BMP, among others. For more information, see Understanding TYMED and WIA_IPA_FILENAME_EXTENSION.
The minidriver can define a global array to hold the WIA_FORMAT_INFO structures, or it can allocate memory for the array. The WIA service will not free the allocated memory, so the minidriver should store a pointer to that memory in the driver item context. The minidriver can then free this memory in a call to IWiaMiniDrv::drvFreeDrvItemContext.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | wiamindr_lh.h (include Wiamindr.h) |