Description
Inserts a byte buffer in the list from a CTBUFF instance.
Prototype
DCTBUFFLST_InsertBuffer...
D PR 10I 0
D@This * Value
D@StrObj * Value
D@Index 10I 0 Value
Parameters
@This
Type | Pointer (*) |
Passing Mode | Value |
Description | The address of an CTBUFFLST instance. This pointer MUST be obtained through a call to CTBUFFLST_Constructor. |
@StrObj
Type | Pointer (*) |
Passing Mode | Value |
Description | The address of a CTBUFF instance provided by the caller. The caller must have called the CTBUFF_Constructor method on the @StrObj parameter before calling this method. The requested byte buffer will be copied to the CTBUFF instance. |
@Index
Type | 10I 0 |
Passing Mode | Value |
Description | The index position of the byte buffer within the CTBUFFLST instance. The first byte buffer in the list is located at index 1 (or CTLST_TOP). If you want to insert at the end of the list, you must specify CTLST_BOTTOM. If you specify an index out of range, the buffer will not be inserted. |
Return Values
Symbolic Constant | Value | Description |
CS_SUCCESS | 0 | The buffer has been inserted successfully. Remember that the CTBUFF instance is not actually copied but the CTBUFF's instance value is what actually gets copied. |
CS_FAILURE | 1 | The buffer was not copied. This could be due to a *null value for the @StrObj parameter or an index out of range. |