IStream::UnlockRegion (Windows CE 5.0)
This method removes the access restriction on a range of bytes previously restricted with IStream::LockRegion.
HRESULT UnlockRegion( ULARGE_INTEGER libOffset,ULARGE_INTEGER cb,DWORD dwLockType );
Parameters
- libOffset
[in] Byte offset for the beginning of the range. - cb
[in] Length, in bytes,of the range to be restricted. - dwLockType
[in] Access restrictions previously placed on the range.
Return Values
The following table shows the return values for this method.
Value | Description |
---|---|
S_OK | The byte range was unlocked. |
E_PENDING | Asynchronous Storage only: Part or all of the stream's data is currently unavailable. |
STG_E_INVALIDFUNCTION | Locking is not supported at all or the specific type of lock requested is not supported. |
STG_E_LOCKVIOLATION | The requested unlock cannot be granted. |
STG_E_REVERTED | The object has been invalidated by a revert operation above it in the transaction tree. |
Remarks
IStream::UnlockRegion unlocks a region previously locked with the IStream::LockRegion method. Locked regions must later be explicitly unlocked by calling IStream::UnlockRegion with exactly the same values for the libOffset, cb, and dwLockType parameters.
The region must be unlocked before the stream is released.
Two adjacent regions cannot be locked separately and then unlocked with a single unlock call.
To determine whether the platform supports this interface, see Determining Supported COM APIs.
Requirements
OS Versions: Windows CE 2.0 and later.
Header: Objidl.h, Objidl.idl.
Link Library: Ole32.lib, Uuid.lib.
Send Feedback on this topic to the authors