Export (0) Print
Expand All

ILockBytes - Global Memory Implementation

The ILockBytes global memory implementation is 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

The following are the methods of the ILockBytes Global Memory Implementation.

ILockBytes::ReadAt

Reads a block of bytes from a specified offset at the beginning of the byte array.

ILockBytes::WriteAt

Writes the block of bytes from a specified offset at the beginning of the byte array.

ILockBytes::Flush

Unlike file-based implementation, calling this method in global memory implementation has no effect.

ILockBytes::SetSize

Sets the size of the byte array.

ILockBytes::LockRegion

This implementation does not support locking, so dwLocksType is set to zero. The caller must 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 data 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 member of the STATSTG structure.

Related topics

ILockBytes
IStorage
IStream

 

 

Community Additions

ADD
Show:
© 2014 Microsoft