Table: | For specifying the type of initialization |
+ combination: | For specifying the hardware-acceleration display mode |
+ combination: | For specifying a cluster node value |
MIL_CONST_TEXT_PTR ServerDescription, | //in |
MIL_INT64 InitFlag, | //in |
MIL_ID *ContextAppIdPtr | //out |
This function allocates a MIL application context. A MIL application context must be allocated prior to using any other MIL functions.
In multi-thread environments, an application context is allocated in the main thread and is shared by all threads. Mapp...() function calls from any thread apply to all threads, unless specifically localized to that thread by specifying M_THREAD_CURRENT when calling the function.
In addition, a default 2D graphics context is also allocated upon allocation of a MIL application context. You can use this default 2D graphics context in MIL graphic function calls by specifying M_DEFAULT wherever a 2D graphics context identifier is required. In multi-thread applications, a default 2D graphics context is allocated for each thread to avoid inter-thread interference.
When allocating a new MIL application context that will be used in a Distributed MIL monitoring configuration (either the monitoring application or publishing application), you should specify the cluster manager. The cluster manager is a server that prevents duplicate application context identifiers by supplying each new MIL application context with a range of allowable identifiers to choose from.
Specifies the computer name or IP address of the cluster manager. When not in a Distributed MIL environment, set this parameter to M_NULL.
For specifying the cluster manager
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
MIL_TEXT("M_DEFAULT") 1 |
Specifies to use the cluster manager specified in the MILConfig utility (Cluster Manager pane, accessible from the Distributed MIL item). This only applies when allocating a MIL application within a Distributed MIL monitoring configuration. (summarize)Specifies to use the cluster manager specified in the MILConfig utility (Cluster Manager pane, accessible from the Distributed MIL item). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that no cluster manager will be used. This applies to MIL applications in the controlling configuration and any MIL application not part of a Distributed MIL configuration. (summarize)Specifies that no cluster manager will be used. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("ClusterManagerName") 1 |
Specifies the computer name or IP address of the cluster manager. Replace "ClusterManagerName" with a string specifying the computer name or IP address of the server used as the cluster manager; MIL supports both IPv4 and IPv6 addresses. This only applies when allocating a MIL application within a Distributed MIL monitoring configuration. (summarize)Specifies the computer name or IP address of the cluster manager. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
Specifies the type of initialization to perform on the MIL application context. This parameter should be set to one of the following values:
For specifying the type of
initialization
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default initialization. During the allocation of the application context, reported error messages are displayed. (summarize)Specifies the default initialization. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_QUIET + |
Specifies to suppress the displaying of error messages during the allocation of the application context. Note that this value can be combined with M_TRACE_LOG_DISABLE. (summarize)Specifies to suppress the displaying of error messages during the allocation of the application context. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TRACE_LOG_DISABLE + |
Specifies to disable the creation of trace logs by any external program, such as Matrox Profiler or the MILConfig utility Interactive Troubleshooting. Calling MappControl() with M_TRACE set to M_LOG_ENABLE will override M_TRACE_LOG_DISABLE from the point in the code that the function appears. Disabling trace logs with M_TRACE_LOG_DISABLE helps to protect intellectual property against reverse engineering because no external program will be able to generate a trace for this application. Note that this value can be combined with M_QUIET. (summarize)Specifies to disable the creation of trace logs by any external program, such as Matrox Profiler or the MILConfig utility Interactive Troubleshooting. (more details...) |
You can add one of the following values to the above-mentioned values to set which hardware-acceleration display mode to use.
By default, MIL uses the mode set using the MILConfig utility.
For specifying the hardware-acceleration display
mode
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description | ||||||||||||||||||||||||||||||||||||||
[This is
only applicable to Windows]
Specifies the version of DirectX that MIL can use for display purposes. This determines the hardware-acceleration display mode. For advantages and restrictions of each mode, see the Supported hardware acceleration modes section of Chapter 23: Displaying an image. (summarize)[This is
only applicable to Windows]
Specifies the version of DirectX that MIL can use for display purposes. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the version of DirectX that MIL can use for display purposes. Note that MIL does not support all versions of DirectX. You can set this parameter to one of the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
[This is
only applicable to Linux]
Specifies whether MIL can use X11 acceleration for display purposes. This determines the hardware acceleration display mode. (summarize)[This is
only applicable to Linux]
Specifies whether MIL can use X11 acceleration for display purposes. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies whether MIL can use X11 acceleration. You can set this parameter to one of the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
You can add the following value to the above-mentioned values to specify a cluster node value without using a cluster manager.
For specifying a cluster node value
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description | ||||||||||||||||||||||||||||||||||||||
Specifies a cluster node value when none is specified with a cluster manager. A Distributed MIL publishing application requires a cluster node value that identifies the publishing application. If you have not specified a cluster manager for this application, ensure that each publishing application in the cluster has a unique, non-zero value. Note that a cluster manager automatically assigns a cluster node value to an application. It is the preferred method of managing cluster node values. (summarize)Specifies a cluster node value when none is specified with a cluster manager. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the cluster node value. |
|||||||||||||||||||||||||||||||||||||||
|
Specifies the address of the variable in which to write the application context identifier. Since the MappAlloc() function also returns the application context identifier, you can set this parameter to M_NULL. If allocation fails, M_NULL is written as the identifier. After allocating an application context, we recommend that you check if the operation was successful, using MappGetError(), or by verifying that the application context identifier returned is not M_NULL.
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |