Overview of Parameter Passing

When using the DllFunction class, it is necessary to specify the type and value of each function parameter. A C programmer typically deals with a much larger set of data types than does an IMLPlus or Java programmer. This is because the C programming language provides the #define preprocessor directive and the typedef statement that allow aliases to be created for the fixed set of primitive data types. When calling a C function from an IMLPlus program, it is necessary to map the C data type expected by the function into an equivalent Java data type. ("Equivalent" in this context usually means "same bit width".) There are several issues to be aware of:

Please refer to the following topics:

Scalar Types

Pointer Types

Pointer Types for Read-Only Null-Terminated Strings

Passing a Numeric Matrix to a C Function

Passing a Character Matrix to a C Function

A good source of example code that demonstrates the use of the DllFunction class to call C functions is the IMLPlus user-interface modules. See Overview of IMLPlus Module Reference for instructions on how to view the source code to these IMLPlus modules.