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 graphics context is also allocated upon allocation of a MIL application context. You can use this default graphics context in MIL graphic function calls by specifying M_DEFAULT wherever a graphics context identifier is required. In multi-thread applications, a default 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
|
||||||||||||||||||||||||||||||||||||||
M_NULL |
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. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("M_DEFAULT") 1 |
Specifies to use the cluster manager as specified in the MILConfig utility, under the Distributed MIL -> Cluster Manager item. (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. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_QUIET + |
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. (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. (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. (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. (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. |