Three routines operate directly on extended key segments:
All three functions return a negative value upon error, where the absolute value of the return value is the error code.
The pkdef parameter points to a definition to be created in a call to PutXtdKeySegmentDef(). In a call to GetXtdKeySegmentDef(), the structure pointed to by pkdef gets filled-in except that the kseg_type member of the structure should be set on input to the type of segment to be retrieved. For example, to retrieve an ICU Unicode definition, set the kseg_type member to ctKSEG_TYPE_UNICODE.
If GetXtdKeySegmentDef() is called with ctKSEGhandle for the filno parameter and the handle value is passed in via the segno parameter (as shown in the third row in the above table), then the kseg_type member of the structure is ignored on input since the handle uniquely identifies the particular definition. On output, the kseg_type member will be set to the type of segment.
One of the important reasons to call GetXtdKeySegmentDef() is to examine the actual locale used for the ICU collation routines. Most applications will not have a reason to call TransformXtdSegment() unless the application needs to create a Unicode binary sort key outside of the normal ISAM processing.