IFillLockBytes::SetFillSize

Sets the expected size of the byte array.

HRESULT SetFillSize(

    ULARGE_INTEGER uISize

// Size in bytes of a byte array object

   );

 

 

Parameters

uISize

[in] Size in bytes of the byte array object that is to be filled in subsequent calls to IFillLockBytes::FillAppendIL6N.0.

 

Return Values

This function supports the standard return values E_OUTOFMEMORY, E_UNEXPECTED, E_INVALIDARG, and E_FAIL.

 

Remarks

If SetFillSize has not been called, any call to ILockBytes::ReadAtEMSPT1 that attempts to access data that has not yet been written using IFillLockBytes::FillAppendIL6N.0 or IFillLockBytes::FillAt1A73ZJZ will return a new error message, E_PENDING. After SetFillSize has been called, any call to ReadAt that attempts to access data beyond the current size, as set by SetFillSize, returns E_FAIL instead of E_PENDING.

See Also

IFillLockBytes::FillAppend, IFillLockBytes::FillAt, ILockBytes::ReadAt