ILockBytes::UnlockRegion
This method removes the access restriction on a range of bytes previously restricted with ILockBytes::LocRegion.
HRESULT UnlockRegion( ULARGE_INTEGER libOffset,
ULARGE_INTEGER cb,
DWORD dwLockType
);
Parameters
- libOffset
[in] Specifies the byte offset for the beginning of the range. - cb
[in] Specifies, in bytes, the length of the range that is restricted. - dwLockType
[in] Specifies the type of access restrictions previously placed on the range. This parameter uses a value from the LOCKTYPE enumeration.
Return Values
One of the values described in the following table is returned.
| Value | Description |
|---|---|
| S_OK | The byte range was unlocked. |
| 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. |
Remarks
ILockBytes::UnlockRegion unlocks a region previously locked with a call to ILockBytes::LockRegion. Each region locked must be explicitly unlocked, using the same values for the libOffset, cb, and dwLockType parameters as in the matching calls to ILockBytes::LockRegion. Two adjacent regions cannot be locked separately and then unlocked with a single unlock call.
Requirements
| Runs on | Versions | Defined in | Include | Link to |
|---|---|---|---|---|
| Windows CE OS | 2.0 and later | Objbase.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.