| MIL 10 Reference
| Customize Help
| Save Settings

MfuncCall



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Execute the slave function.
Syntax
MIL_INT MfuncCall(
MIL_ID ContextFuncId //in
)
Description

This function executes the slave function of the user-defined MIL function on the target system. The target system is determined by the values of the user-defined MIL function parameters, registered in the master function. (For more information, see the Master/slave dynamics on a remote system section of Chapter 33: The MIL function development module.) Call MfuncCall() from the master function of the user-defined MIL function. Note that you must call MfuncCall() from the same thread as MfuncAlloc() and MfuncFree(). If tracing and error reporting are enabled, the tracing and error messages will be reported to screen. You can control the error handling and tracing behavior as you would with other MIL functions, using MappControl().

Note that if a MIL_ID parameter was registered in the master function with MfuncParamMilId(), the validity of that identifier will be checked during the execution of MfuncCall(). If the identifier is not valid, the slave function is not executed.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameter
ContextFuncId

Specifies the identifier of the user-defined MIL function.

The slave function executed using MfuncCall() must be declared as follows:

void MFTYPE SlaveFunction(
MIL_ID ContextFuncId
)
Parameters
ContextFuncId

Specifies the identifier of the user-defined MIL function that references this slave function. This is the identifier returned by the MfuncAlloc() function.

Return value
The returned value is M_NULL if an error occurred; otherwise, not null.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.