Overview of external functions
The parts in the External Functions category on the parts palette make it possible to access external program logic in dynamic link libraries (DLLs) by making connections in the Composition Editor.
An external function part represents a call to an external function; parts connected to it can call the function, pass data to it, and retrieve the results.
Note:
All functions called by way of the PlatformFunction mechanism must be declared with the _System calling convention.
VA Smalltalk communicates with external program logic through records, which are formatted chunks of data that are both passed to and received from the external function. When a VA Smalltalk application calls the external function, it passes to it one or more records, each one a structured array of data that can contain both input and output fields. When the function completes, any output fields will be filled in with the function's return values.
To define record formats, you must provide VA Smalltalk with a C header (.H) or COBOL copy library file that declares the records:
• When provided with a C header file, VA Smalltalk identifies all data types defined by typedef or struct, and all functions that have prototypes in the header. Each data type becomes a record that is available to be used with the external function.
• When provided with a COBOL copy library file, VA Smalltalk identifies all records defined by 01-level and 77-level declarations, and all procedure divisions declared in the file. Each record is then available to be used with the external function.
After VA Smalltalk has extracted the information from the header or copy library file, you can choose which records you want to pass to the External Function part and which function or procedure you want the part to access.
Last modified date: 01/29/2015