MIL_ID ContextCodeId, | //in |
MIL_INT64 Operation, | //in |
MIL_INT64 CodeType, | //in |
MIL_INT Instance, | //in |
MIL_INT64 ControlFlag, | //in |
MIL_ID *ModelCodeIdPtr | //in-out |
This function adds a code model to a code context, finds a code model of a particular type in a code context, or deletes a code model from a code context.
A code context can contain multiple models of 1D code types (excluding GS1 Databar, Planet, Postnet, and 4-state code), 2D codes types, and composite code types. You can add multiple code models to the code context by calling McodeModel() multiple times.
Use McodeControl() and McodeInquire() to configure or retrieve information about a code model or code context.
The added code models cannot be individually freed using McodeFree(). They are either automatically freed when their context is freed, or when they are removed from the context by calling McodeModel() with M_DELETE.
Note that, aside from being associated with a code model identifier, the code model is given a sequential index number within the code context, in the order that the code model was added. If a code model is deleted, all code models with higher indices are shifted down one.
Specifies the code context in which to add, find, or delete the code model. The code context must have been previously allocated on the required system using McodeAlloc().
Specifies the operation to perform within the specified code context. This parameter must be set to one of the following values:
For specifying the type of operation to
perform
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_ADD |
Adds a new code model to the code context. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DELETE |
Deletes a code model within the code context, whose model identifier is specified by the ContextCodeId parameter. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FIND |
Finds a code model within the code context, whose code type is specified by the CodeType parameter. (more details...) |
Specifies the code type of the code model to add or find from the code context. Note that if the Operation parameter is set to M_DELETE, set this parameter to M_NULL. Possible values for CodeType are listed below.
To find a code model of any type, the CodeType parameter must be set to the following:
For finding code models of any
type
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_ANY |
Matches all code types. (more details...) |
To specify the type of a 1D code model to add or find, the CodeType parameter can be set to one of the following:
For specifying a 1D code
type
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_4_STATE |
Specifies a 4-state code type. |
||||||||||||||||||||||||||||||||||||||
M_BC412 |
Specifies a BC412 code type. |
||||||||||||||||||||||||||||||||||||||
M_CODABAR |
Specifies a Codabar code type. |
||||||||||||||||||||||||||||||||||||||
M_CODE39 |
Specifies a Code 39 code type. |
||||||||||||||||||||||||||||||||||||||
M_CODE93 |
Specifies a Code 93 code type. |
||||||||||||||||||||||||||||||||||||||
M_CODE128 |
Specifies a Code 128 code type. |
||||||||||||||||||||||||||||||||||||||
M_EAN8 |
Specifies an EAN 8 code type. |
||||||||||||||||||||||||||||||||||||||
M_EAN13 |
Specifies an EAN 13 code type. |
||||||||||||||||||||||||||||||||||||||
M_EAN14 |
Specifies an EAN 14 code type. |
||||||||||||||||||||||||||||||||||||||
M_GS1_128 |
Specifies a GS1-128 code type. |
||||||||||||||||||||||||||||||||||||||
M_GS1_DATABAR |
Specifies a GS1 Databar code type. |
||||||||||||||||||||||||||||||||||||||
M_INDUSTRIAL25 |
Specifies an Industrial 2 of 5 (standard 2 of 5) code type. |
||||||||||||||||||||||||||||||||||||||
M_INTERLEAVED25 |
Specifies an Interleaved 25 (ITF-14) code type. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PHARMACODE |
Specifies a Pharmacode code type. |
||||||||||||||||||||||||||||||||||||||
M_PLANET |
Specifies a Planet code type. |
||||||||||||||||||||||||||||||||||||||
M_POSTNET |
Specifies a Postnet code type. |
||||||||||||||||||||||||||||||||||||||
M_UPC_A |
Specifies a UPC-A code type. |
||||||||||||||||||||||||||||||||||||||
M_UPC_E |
Specifies a UPC-E code type. |
To specify the type of a 2D code model to add or find, the CodeType parameter can be set to one of the following:
For specifying a 2D code
type
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_AZTEC |
Specifies an Aztec code type. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DATAMATRIX |
Specifies a Data Matrix code type. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MAXICODE |
Specifies a Maxicode code type. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MICROPDF417 |
Specifies a MicroPDF417 code type. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MICROQRCODE |
Specifies a Micro QR code type. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PDF417 |
Specifies a PDF417 code type. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_QRCODE |
Specifies a QR code type. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TRUNCATED_PDF417 |
Specifies a Truncated PDF417 code type. (more details...) |
To specify that the code model to add or find is a composite code, the CodeType parameter must be set to the following:
For specifying a composite code
type
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_COMPOSITECODE |
Specifies a composite code type. (more details...) |
Specifies the instance of the code model to find in the context. Note that if the Operation parameter is set to M_ADD or M_DELETE, set this parameter to M_NULL.
Each code model is associated with a unique identifier, starting at zero, when it is added to a code context, this is a model's instance. If a code type is specified using the CodeType parameter, the Instance parameter must indicate the instance, starting at zero, of that particular code type.
For specifying the instance of a code
model
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
Value |
Specifies the instance of the individual code model on which to perform the operation. |
Specifies the function's control flag. Reserved for future expansion. This parameter must be set to M_DEFAULT.
Specifies the address in which to return the code model identifier for M_ADD and M_FIND operations. For a M_DELETE operation, ModelCodeIdPtr specifies the identifier of the model to be deleted. For M_ADD and M_FIND operations, you can set this parameter to M_NULL, since this function also returns the code model identifier.
Header | Include mil.h. |
Library | Use mil.lib; milcode.lib. |
DLL | Requires mil.dll; milcode.dll. |