ctGETHGH Retrieve the high-order 4 bytes of an 8-byte value. Short Name ctGETHGH() Type Low level function Declaration LONG ctGETHGH() Description Call ctGETHGH() after a routine that returns or sets an output parameter to a record address or other 8-byte address to get the high-word portion of the address. To minimize the effect on performance in client/Server environments, ctGETHGH() does not make a separate call to the c-tree Server. Instead, the information needed by ctGETHGH() is cached on the client side. Return ctGETHGH() returns the high word portion of the address. See “c-tree Plus Error Codes” in the c-tree Plus Programmer’s Reference Guide for a complete listing of valid c-tree Plus error values. Example /* Assumes a key length of 14 (8 bytes for HUGE duplicate support), */
TEXT keybuf[14];
recadr_lw = FirstKey( 9, /* index file number */ keybuf /* output key buffer */ );
recadr_hw = ctGETHGH(); Limitations ctGETHGH() clears the internal high-word variable when used. In most cases, this is not an issue, but if used for debug purposes, follow-up with ctSETHGH() to reset the value if it is required by a following function. The recbyt parameter in this function is a 4-byte value capable of addressing at most 4 gigabytes. If your application supports HUGE files (greater than 4 gigabytes), you must use the ctSetHgh() and ctGetHgh() functions to set or get the high order 4 bytes of the file offset. See also ctSETHGH() |
|||