Bewerken

Delen via


IWiaMiniDrv::drvLockWiaDevice method (wiamindr_lh.h)

The IWiaMiniDrv::drvLockWiaDevice method locks the WIA hardware device so that only the current minidriver can access it.

Syntax

HRESULT drvLockWiaDevice(
  BYTE *__MIDL__IWiaMiniDrv0030,
  LONG __MIDL__IWiaMiniDrv0031,
  LONG *__MIDL__IWiaMiniDrv0032
);

Parameters

__MIDL__IWiaMiniDrv0030

lFlags [in]

Reserved.

__MIDL__IWiaMiniDrv0031

pWiasContext [in]

Pointer to a WIA item context.

__MIDL__IWiaMiniDrv0032

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 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

The IWiaMiniDrv::drvLockWiaDevice method is used to lock access to the device. This is typically done before properties are written to the device or before a data transfer. The IWiaMiniDrv::drvLockWiaDevice method should be implemented using the IStiDevice interface's lock device method, IStiDevice::LockDevice.

Requirements

Requirement Value
Target Platform Desktop
Header wiamindr_lh.h (include Wiamindr.h)

See also

IWiaMiniDrv

IWiaMiniDrv::drvGetDeviceErrorStr

IWiaMiniDrv::drvUnLockWiaDevice