| Customize Help
| Save Settings

McodeRestore



Function Map
Synopsis
Restore a code context from disk.
Syntax
MIL_ID McodeRestore(
MIL_CONST_TEXT_PTR FileName, //in
MIL_ID SysId, //in
MIL_INT64 ControlFlag, //in
MIL_ID *ContextCodeIdPtr //out
)
Description

This function restores a code context that has been saved to a file, using McodeSave() or McodeStream(). This function can also restore a code context from a predefined code context file distributed with MIL (such as, C:\Program Files\Matrox Imaging\contexts\SEMI_T1-95r303.mco). For more information, refer to the Predefined SEMI code contexts subsection of the Supported code types section of Chapter 15: Codes.

This function restores all of the code context's controls and models that were in effect when the code context was saved.

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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
FileName

Specifies the path and name of the file from which to restore the code context (for example, "C:\mydirectory\myfile"). The function handles (internally) the opening and closing of the file.

The predefined code context files, distributed with MIL, are in the "C:\Program Files\Matrox Imaging\contexts\" folder.

To retrieve the file from the remote computer (under Distributed MIL), prefix the specified file name string with "remote:///" (for example, "remote:///C:\mydirectory\myfile").

This parameter can be set to one of the following:

function map For specifying the file name and path
Click to summarizeValue Description
Click to summarize M_INTERACTIVE
[This is only applicable to Windows]

Opens the File Open dialog box from which you can interactively specify the drive, directory, and name of the file.

Click to summarize MIL_TEXT("Filename.mco") 1

Specifies to restore a user-defined code context.

Click to summarize MIL_TEXT("SEMI_T1-95r303.mco") 1

Specifies to restore a predefined BC-412 1D code context that matches the "SEMI SEMI T1-95 (reapproved 0303) specification for back surface bar code marking of silicon wafers . USA: SEMI, 2003. 10.".

(summarize)
Click to summarize MIL_TEXT("SEMI_T2-0298E.mco") 1

Specifies to restore a predefined Data Matrix 2D code context with an ECC_200 encoding scheme that matches the "SEMI SEMI T2-0298 (reapproved 1104) specification for marking of wavers with a two-dimensional matrix code symbol . USA: SEMI, 2004. 9.".

(summarize)
Click to summarize MIL_TEXT("SEMI_T7-0303.mco") 1

Specifies to restore a predefined Data Matrix 2D code context that matches the "SEMI SEMI T7-0303 specification for back surface marking of double-side polished wafers with a two-dimensional matrix code symbol . USA: SEMI, 2003. 4.".

(summarize)

1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().

SysId

Specifies the system on which to allocate the context. This parameter should be set to one of the following values:

function map For specifying the system
Click to summarizeValue Description
Click to summarize M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Click to summarize MIL system identifier

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

ControlFlag

Reserved for future expansion. This parameter must be set to M_DEFAULT.

ContextCodeIdPtr

Specifies the address of the variable in which to return the identifier of the code context. Since the function also returns the identifier, this parameter can be set to M_NULL.

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