IStiDevice::LockDevice method (sti.h)
The IStiDevice::LockDevice method locks a device for exclusive use by the caller.
Syntax
HRESULT LockDevice(
[in] DWORD dwTimeOut
);
Parameters
[in] dwTimeOut
Caller-supplied time-out value, in milliseconds. If the lock is not obtained in this time period, an error is returned.
Return value
If the operation succeeds, the method returns S_OK. Otherwise, it returns one of the STIERR-prefixed error codes defined in stierr.h.
Remarks
Clients of the IStiDevice COM interface must call IStiDevice::LockDevice before calling the following methods:
If the IStiDevice::LockDevice method is able to obtain an IStiDevice-level lock on the device within the specified time-out period, it then calls IStiUSD::LockDevice in the appropriate vendor-supplied minidriver.
Each call to IStiDevice::LockDevice must be paired with a call to IStiDevice::UnLockDevice.
Before calling IStiDevice::LockDevice, clients of the IStiDevice COM interface must call IStillImage::CreateDevice to obtain an IStiDevice interface pointer, which provides access to a specified device.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | sti.h (include Sti.h) |