Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Host Language Call Interface : Avoiding common HLC errors
 

Avoiding common HLC errors

To ensure compatibility between your HLC functions and ABL, consider the following when writing your functions:
*An HLC library function does not always return character and decimal data as null-terminated strings. For example, the pvar parameter of the prordc() function contains character data without null termination. To terminate such a string with the null character, you must add it yourself.
*When you check the value of a field or variable that HLC returns, check for the Unknown value (?). The field might not always contain a valid value.
*If you return from your top-level function without setting an appropriate return code value, the AVM might raise an error condition unexpectedly. See Returning error codes from a top-level function for more information.
*Use the promsgd() HLC library function to display messages directly to the terminal. Using the standard C function printf() might produce unexpected results when used to send raw data to a terminal.