| MIL 10 Reference
| Customize Help
| Save Settings

MmeasAllocContext



See also
Availability
Not 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
None.
Previous
Synopsis
Allocate a measurement context.
Syntax
MIL_ID MmeasAllocContext(
MIL_ID SystemId, //in
MIL_INT64 ControlFlag, //in
MIL_ID *ContextIdPtr //out
)
Description

This function allocates a measurement context on the specified system. MIL uses a measurement context to control the behavior of measurement operations (MmeasFindMarker() and MmeasCalculate()). You can modify the settings of a measurement context with MmeasControl(). When you no longer require a measurement context, release its memory using MmeasFree().

MIL allows you to specify M_DEFAULT as the identifier of the measurement context, when using MmeasFindMarker(), MmeasCalculate(), and MmeasInquire(); therefore, you need not call MmeasAllocContext(). However, you cannot specify M_DEFAULT as the identifier of the measurement context if want to modify it using MmeasControl(); to modify a measurement context, you must actually allocate it using MmeasAllocContext().

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.
Parameters
SystemId INQ

Specifies the system on which the to allocate the measurement context.

This parameter should be set to one of the following values:

function map For specifying the system identifier
CollapseValue Description
Collapse M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Collapse MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

ContextIdPtr

Specifies the address of the variable in which the measurement context identifier is to be written. If allocation fails, M_NULL is written as the identifier. Since the MmeasAllocContext() function also returns the marker identifier, you can set this parameter to M_NULL.

Return value
The returned value is the measurement context identifier if the allocation is successful. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib; milmeas.lib.
DLL Requires mil.dll; milmeas.dll.
DEFAULT HOST