Changes the size of the byte array.
HRESULT SetSize(
ULARGE_INTEGER cb //Specifies the new size of the byte array in
//bytes
);
ILockBytes::SetSize changes the size of the byte array. If the cb parameter is larger than the current byte array, the byte array is extended to the indicated size by filling the intervening space with bytes of undefined value, as does ILockBytes::WriteAt, if the seek pointer is past the current end-of-stream.
If the cb parameter is smaller than the current byte array, the byte array is truncated to the indicated size.
Callers cannot rely on STG_E_MEDIUMFULL being returned at the appropriate time because of cache buffering in the operating system or network. However, callers must be able to deal with this return code because some ILockBytes implementations might support it.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objidl.h.
ILockBytes::ReadAt, ILockBytes::WriteAt, ILockBytes—File-Based Implementation, ILockBytes—Global Memory Implementation