Description
Retrieves an item from the map into a caller-supplied buffer. Do not use a CTBUFF instance. Use the address of a local variable or the address of a buffer allocated with a call to %Alloc.
Prototype
DCTMAPX_Lookup...
D PR 10I 0
D@This * Value
D@Key * Value
D@Value * Value
D@ValueSize 10I 0
Parameters
@This
Type | Pointer (*) |
Passing Mode | Value |
Description | The address of a CTMAPX instance. This pointer MUST be obtained through a call to CMAPX_Constructor. |
@Key
Type | Pointer (*) |
Passing Mode | Value |
Description | The address of a the caller-supplied buffer that contains the key value associated with the map item. The key value must be a NULL-terminated character string. |
@Value
Type | Pointer (*) |
Passing Mode | Value |
Description | The address of a caller-supplied buffer. Don't use a CTBUFF instance. This buffer can be a local variable or a buffer allocated with a call to %Alloc. |
@ValueSize
Type | 10I 0 |
Passing Mode | Reference |
Description | The size in bytes of the caller supplied buffer. On return, this paramter will hold the actual size in bytes of the next available item. If the supplied buffer is too small, then only @ValueSize bytes have been copied so as to not overflow the supplied buffer. If the supplied buffer is larger than the map item, then, on return, this parameter holds the number of bytes that were actually copied into the supplied buffer (which happens to be the item's real size). |
Return Values
Symbolic Constant | Value | Description |
CS_SUCCESS | 0 | The item has been found and copied in the caller-supplied buffer. |
CS_FAILURE | 1 | The item could not be found. Another possibility is that the key is *null or that the specified key size is zero. |