Clara-Doc - Method Reference

 / packages  / CTBASE  / Version 01.00.00  / CTMAPX

CTMAPX_Lookup
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
TypePointer (*)
Passing ModeValue
DescriptionThe address of a CTMAPX instance. This pointer MUST be obtained through a call to CMAPX_Constructor.
@Key
TypePointer (*)
Passing ModeValue
DescriptionThe 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
TypePointer (*)
Passing ModeValue
DescriptionThe 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
Type10I 0
Passing ModeReference
DescriptionThe 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 ConstantValueDescription
CS_SUCCESS0The item has been found and copied in the caller-supplied buffer.
CS_FAILURE1The item could not be found. Another possibility is that the key is *null or that the specified key size is zero.