EGL programs can invoke C
functions with the
call statement.
Follow these steps to invoke a C function from EGL:
- Identify
the C function to call. This function must return an integer
value; zero indicates success and any other value prompts EGL to throw
an
InvocationException from the statement that invoked the C function.
- Link to the C function and the DLL containing that function using
a callLink
element with type set to remoteCall,
as explained in the EGL Generation Guide. See If callLink type is remoteCall.
- Call the function using the following syntax:
call functionName (parameters);
Use
the pgmName property of the callLink element
as functionName, and any parameters to pass
to the
function as parameters. To map EGL data
types to
C data types for use in these parameters, see Mapping EGL data types to C.