ILockBytes - Global Memory Implementation

Implemented on a byte array object underlying a COM compound file storage object, and designed to read and write directly to global memory.

When to Use

Methods of ILockBytes are called from the compound file implementations of IStorage and IStream on the compound file storage object created through a call to StgCreateDocfile.

Remarks

ILockBytes::ReadAt
This method queries the wrapped pointer for the requested interface.
ILockBytes::WriteAt
This method queries the wrapped pointer for the requested interface.
ILockBytes::Flush
This method queries the wrapped pointer for the requested interface.
ILockBytes::SetSize
This method queries the wrapped pointer for the requested interface.
ILockBytes::LockRegion
This implementation does not support locking, so dwLocksType is set to zero. It is the caller's responsibility to ensure accesses are valid and mutually exclusive.
ILockBytes::UnlockRegion
This implementation does not support locking.
ILockBytes::Stat
The COM-provided IStorage::Stat implementation calls the ILockBytes::Stat method to retrieve information about the byte array object. If there is no reasonable name for the byte array, the COM-provided ILockBytes::Stat method returns NULL in the pwcsName field of the STATSTG structure.

See Also

ILockBytes, IStorage, IStream