MIL_ID ContextAppId, | //in |
MIL_INT64 ControlType, | //in |
MIL_INT ControlValue | //in |
This function controls the settings of a MIL application environment. These settings include printing error messages to the screen, parameter checking, logging trace information, as well as on-board memory and processing compensation modes. This function can also clear current and/or global errors.
In multi-thread environments, an MappControl() call applies to all application threads running MIL, unless specifically limited to the calling thread by adding M_THREAD_CURRENT to the ControlType parameter. When you override settings for a specific thread, a subsequent call to change those settings from any other thread will not change the settings. For example, if you enable trace printing for a particular thread, that thread will ignore calls from other threads that try to change trace printing setting. Note that any thread created by the current thread will automatically inherit all the current thread's settings, but it will not inherit this exclusivity.
Specifies the identifier of the application context to use.
For specifying the application
context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the current application context. |
||||||||||||||||||||||||||||||||||||||
Application Context Identifier |
Specifies the application context identifier. |
Specifies the type of application environment setting to control.
See the Parameter associations section for possible values that can be specified.
Specifies the setting's new value.
See the Parameter associations section for possible values that can be specified.
The tables below list possible values for the ControlType and ControlValue parameters.
The following ControlType and corresponding ControlValue parameter settings are used to manage error functionality in the application.
For managing error
functionality
|
|||||||||||||||||||||||||||||||||||||||
ControlType |
Description
|
||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_CLEAR_ERROR + |
Clears current and/or global errors. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies to clear both current and global errors. |
||||||||||||||||||||||||||||||||||||||
M_CURRENT |
Specifies to clear only current errors. |
||||||||||||||||||||||||||||||||||||||
M_GLOBAL |
Specifies to clear only global errors. |
||||||||||||||||||||||||||||||||||||||
M_ERROR + |
Sets whether the printing of error messages to screen is enabled. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PRINT_DISABLE |
Specifies not to print error messages. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PRINT_ENABLE |
Specifies to print error messages. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_THROW_EXCEPTION |
Specifies that when an error occurs, a .NET exception will be thrown instead of a message box being displayed. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ERROR_HOOKS |
Sets whether an error event type (specified using MappHookFunction() set to M_ERROR_CURRENT, M_ERROR_GLOBAL, or M_ERROR_FATAL) will trigger the user defined function specified in MappHookFunction(). INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies to not trigger the user defined function when an error event type occurs, as specified in MappHookFunction(). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ENABLE |
Specifies to trigger the user defined function when an error event type occurs, as specified in MappHookFunction(). (more details...) |
The following ControlType and corresponding ControlValue parameter settings are used to control the application environment.
For specifying the type of application
environment
|
|||||||||||||||||||||||||||||||||||||||
ControlType | Description
|
||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
M_DMIL_CONNECTION |
Specifies the Distributed MIL monitoring configuration global permission level. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DISABLE |
Specifies that Distributed MIL monitoring configuration is disabled in the current application. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DMIL_CONTROL |
Specifies that MIL objects in the current application can be accessed with either read only or read/write permission, depending on how that MIL object was specified with MappControlObject(). |
||||||||||||||||||||||||||||||||||||||
M_DMIL_MONITOR |
Specifies that MIL objects in the current application can be accessed only with read only permission, regardless of how that MIL object was specified with MappControlObject(). |
||||||||||||||||||||||||||||||||||||||
M_DMIL_CONNECTION_PORT |
Specifies the listening port for a publishing application in the Distributed MIL monitoring configuration. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
Listening port |
Specifies the listening port (an integer between 0 and 65535) that the current application will use to listen for connections from a monitoring application. |
||||||||||||||||||||||||||||||||||||||
M_MEMORY + |
Sets whether on-board memory compensation on the Host is enabled. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_COMPENSATION_DISABLE |
Specifies that on-board memory compensation is disabled. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_COMPENSATION_ENABLE |
Specifies that on-board memory compensation is enabled. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PARAMETER + |
Sets whether the checking of parameters is enabled. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHECK_DISABLE |
Specifies that checking of parameters is disabled. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_CHECK_ENABLE |
Specifies that checking of parameters is enabled. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PROCESSING + |
Sets whether the Host should compensate for processes that cannot be performed on-board due to board-specific limitations. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_COMPENSATION_DISABLE |
Specifies that on-board processing compensation is disabled. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_COMPENSATION_ENABLE |
Specifies that on-board processing compensation is enabled. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TRACE + |
Sets the trace setting, which controls when a trace log is generated. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default trace setting, which either enables or disables generating a trace log, based on whether Matrox Profiler (or Matrox Interactive log) was used to start generating the log. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_LOG_DISABLE |
Specifies the log disable setting, which stops generating the trace log. |
||||||||||||||||||||||||||||||||||||||
M_LOG_ENABLE |
Specifies the log enable setting, which starts generating the trace log. |
||||||||||||||||||||||||||||||||||||||
M_TRACE_SAVE_TO_FILE |
Transfers all gathered trace data from the temporary circular trace log buffer to an . (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies to use the default path and default file name. |
||||||||||||||||||||||||||||||||||||||
Casts the address of the string identifying the specified path and/or file name, from a MIL_CONST_TEXT_PTR to a MIL_INT. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the string whose address to cast. |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
You can add the following value to the above-mentioned values to set whether the control should be limited to the current thread.
For limiting effects to the current
thread
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_THREAD_CURRENT |
Limits the effect of the control type setting to the current thread. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |