| MIL 10 Reference
| Customize Help
| Save Settings

McodeRestore



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux with restrictions

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.
Synopsis
Restore a code context previously saved to a file.
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 12: 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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
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
CollapseValue Description
Collapse 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.

Collapse MIL_TEXT("Filename.mco") 1

Specifies to restore a user-defined code context.

Collapse 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)
Collapse 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)
Collapse 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
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. 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