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.
The following are the methods of the ILockBytes Global Memory Implementation.
Reads a block of bytes from a specified offset at the beginning of the byte array.
Writes the block of bytes from a specified offset at the beginning of the byte array.
Unlike file-based implementation, calling this method in global memory implementation has no effect.
Sets the size of the byte array.
This implementation does not support locking, so dwLocksType is set to zero. The caller must ensure accesses are valid and mutually exclusive.
This implementation does not support locking.
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.