Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Host Language Call Interface : Writing C functions
 

Writing C functions

The following figure shows the relationship between the PRODSP() dispatch routine that ABL supplies and your C functions.
Figure 65. Relationship between PRODSP() and your C functions
In general, your C functions can perform the following tasks:
*Call HLC library functions to read data from and write data to ABL shared buffers and variables. HLC library functions are C functions that ABL provides to access the OpenEdge application environment from a user-written C function.
*Perform operations using data from both OpenEdge and other sources. Other sources might include optical scanners, process monitor and control devices, spreadsheets, and other devices or applications not supported directly by OpenEdge.
Your C functions consist of functions called directly from PRODSP() (top-level functions), and functions called directly or indirectly from the top-level functions (subfunctions). All top-level functions must return control to ABL, regardless of the subfunctions called.
* Top-level C function declaration
* Returning error codes from a top-level function
* Naming C functions
* C function portability