MmeasAllocResult()函数

Synopsis

Allocate a measurement result buffer.

Format

MIL_ID MmeasAllocResult(SystemId, ResultType, MeasResultIdPtr)

MIL_ID SystemId; System identifier
long ResultType; Type of result buffer
MIL_ID *MeasResultIdPtr; Storage location for measurement result buffer identifier

Description

This function allocates a measurement result buffer on the specified system to be used for storing measurement results obtained from an MmeasCalculate operation. When the result buffer is no longer required, you should release its memory, using MmeasFree.

The SystemId parameter specifies the system on which the result buffer will be allocated. This parameter must be set to a valid system identifier, M_DEFAULT_HOST, or M_DEFAULT. Specify M_DEFAULT_HOST to allocate on the default Host system of the current MIL application. Specify M_DEFAULT to have MIL select the most appropriate system on which to allocate the buffer (it can be the default Host system or any already allocated system).

The ResultType parameter specifies the type of result buffer to allocate and must be set to M_CALCULATE.

The ResultIdPtr specifies the address of the variable in which the measurement result buffer identifier is to be written. If allocation fails, M_NULL is returned as the identifier. Since the MmeasAllocResult function also returns the measurement result buffer identifier, you can set this parameter to M_NULL.

Returned value

The returned value is the measurement result buffer identifier. If allocation fails, M_NULL is returned.

See also

MmeasFree, MmeasCalculate, MmeasGetResult

《MmeasAllocResult()函数》上有1条评论

评论已关闭。