IWiaMiniDrv::drvFreeDrvItemContext method (wiamindr_lh.h)
The IWiaMiniDrv::drvFreeDrvItemContext method frees a device-specific context.
Syntax
HRESULT drvFreeDrvItemContext(
LONG __MIDL__IWiaMiniDrv0056,
BYTE *__MIDL__IWiaMiniDrv0057,
LONG *__MIDL__IWiaMiniDrv0058
);
Parameters
__MIDL__IWiaMiniDrv0056
lFlags [in]
Reserved.
__MIDL__IWiaMiniDrv0057
pSpecContext [in]
Points to a device-specific context.
__MIDL__IWiaMiniDrv0058
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.
Return value
On success, the method should return S_OK and clear the device error value pointed to by plDevErrVal. If the method fails, it should return a standard COM error code and place a minidriver-specific error code in the memory pointed to by plDevErrVal.
The value pointed to by plDevErrVal can be converted to a string by calling IWiaMiniDrv::drvGetDeviceErrorStr.
Remarks
When a driver item is deleted, the WIA service frees the driver item context. This method informs the minidriver that the context is ready to be freed. The minidriver should free any memory that it allocated for the context. For example, in IWiaMiniDrv::drvReadItemProperties, a camera minidriver might allocate a cache to store the thumbnail for an item, and store a pointer to this cache in the driver item context. The minidriver would then free the cache in this method.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | wiamindr_lh.h (include Wiamindr.h) |