CBL_READ_VFILE

Reads bytes from a heap.

Syntax:

call "CBL_READ_VFILE" using by value heap-id
                                     heap-ref
                                     heap-length
                      by reference   heap-buffer
                      returning      status-code

Parameters:

  Using call prototype (see Key) Picture
heap-id cblt-vfile-handle. pic x(2) comp-5.
heap-ref cblt-x4-comp5. pic x(4) comp-5.
heap-length cblt-x4-comp5. pic x(4) comp-5.
heap-buffer pic x(n). pic x(n).
status-code See Library Routines - Key.  

On Entry:

heap-id This contains the heap handle assigned when the heap was opened.
heap-ref Offset in the heap at which to start reading. In .NET, this is limited to a maximum value of 0x7fffffff.
heap-length Number of bytes to read.

On Exit:

heap-buffer Buffer into which bytes are read. It is your responsibility to ensure that the buffer is large enough to hold the number of bytes being read.

Comments:

Trying to read data from an area of the heap which has not yet been written results in indeterminate data being returned to the buffer.