Restricts access to a specified range of bytes using IStream::LockRegion.
_StreamLockRegion(ByRef $oStream, $iOffset, $iLength, $dwLockType)
| $oStream | IStream COM object. |
| $iOffset | Starting offset of the region to lock. |
| $iLength | Length of the region to lock. |
| $dwLockType | Type of lock (e.g., 0x00000000 for exclusive lock). |
| Success: | 1 |
| Failure: | 0, sets @error to: 1 - Invalid stream object. 2 - COM error (HRESULT in @extended). |