MocrAllocResult()函数

Synopsis

Allocate an OCR result buffer.

Format

MIL_ID MocrAllocResult(SystemId, InitFlag, OcrResultIdPtr)

MIL_ID SystemId; System identifier
long InitFlag; Initialization flag
MIL_ID *OcrResultIdPtr; Storage location for OCR result buffer identifier

Description

This function allocates a result buffer and returns an identifier to it for use with other OCR functions. When the result buffer is no longer required, you should release it using the MocrFree function.

The SystemId parameter specifies the system on which to allocate the OCR result buffer. This parameter must be given a valid system identifier. Alternatively, the parameter can be set to M_DEFAULT to have MIL automatically select the most appropriate system on which to allocate the buffer (either on the default Host system or on another system already allocated). If this parameter is set to M_DEFAULT_HOST, the default Host system of the current MIL application will be chosen for the allocation.

The InitFlag parameter is an initialization flag and should be set to M_DEFAULT.

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

Returned value

This function returns the OCR result buffer identifier. If allocation fails, M_NULL is returned as the identifier.

See also

MocrFree, MocrGetResult