Clara-Doc - Method Reference

CTBUFFLST_GetValue
Description
Copies a byte buffer from the CTBUFFLST instance at a specified index location into another buffer. The supplied buffer must NOT be a CTBUFF instance. For example, this could be an ALPHA field or a byte buffer allocated by the caller using %Alloc.

Prototype

			
     DCTBUFFLST_GetValue...
     D                 PR            10I 0
     D@This                            *   Value
     D@ValBuff                         *   Value
     D@Size                          10I 0
     D@Index                         10I 0 Value
						
Parameters
@This
TypePointer (*)
Passing ModeValue
DescriptionThe address of an CTBUFFLST instance. This pointer MUST be obtained through a call to CTBUFFLST_Constructor.
@ValBuff
TypePointer (*)
Passing ModeValue
DescriptionThe address of a user-supplied buffer. Don't use a CTBUFF instance; this will likely corrupt it. The user-supplied buffer can be a local variable of any type (as long as you know in advance what is held in the byte buffer) or a buffer resulting from a call to %Alloc.
@Size
Type10I 0
Passing ModeReference
DescriptionThe size in bytes of the buffer pointed to by the @ValBuff parameter. On return, this parameter will hold the actual size of the requested byte buffer. This way, the caller can know if the supplied buffer wasn't large enough or how many bytes in the supplied buffer are those from the CTBUFFLST instance if the supplied buffer is too large.
@Index
Type10I 0
Passing ModeValue
DescriptionThe index of the requested byte buffer within the CTBUFFLST instance. The first byte buffer is located at index 1.
Return Values

Symbolic ConstantValueDescription
CS_SUCCESS0The byte buffer has successfully been copied into the supplied buffer.
CS_FAILURE1The byte buffer has not been copied. This is either because the index is out of range or because the @ValBuff parameter is *null or the @Size parameter is zero.