ILockBytes interface

The ILockBytes interface is implemented on a byte array object that is backed by some physical storage, such as a disk file, global memory, or a database. It is used by a COM compound file storage object to give its root storage access to the physical device, while isolating the root storage from the details of accessing the physical storage.

Methods

The ILockBytes interface has these methods.

Method Description
ILockBytes::Flush The Flush method ensures that any internal buffers maintained by the ILockBytes implementation are written out to the underlying physical storage.
ILockBytes::LockRegion The LockRegion method restricts access to a specified range of bytes in the byte array.
ILockBytes::ReadAt The ReadAt method reads a specified number of bytes starting at a specified offset from the beginning of the byte array object.
ILockBytes::SetSize The SetSize method changes the size of the byte array.
ILockBytes::Stat The Stat method retrieves a STATSTG structure containing information for this byte array object.
ILockBytes::UnlockRegion The UnlockRegion method removes the access restriction on a previously locked range of bytes.
ILockBytes::WriteAt The WriteAt method writes the specified number of bytes starting at a specified offset from the beginning of the byte array.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header objidl.h