MatchUp Object:Matchcode:Initialization

From Melissa Data Wiki
Revision as of 22:01, 19 December 2016 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

← MatchUp Object Reference

MatchUp Object Matchcode Interface Navigation
Overview
Order of Operations
Mapping Information
Functions
Initialization
Creation
Retrieval
Properties
Component Information
Mapping
Change Settings
Read Settings
Modification
Saving



Initializing the Matchcode interface is simpler than the other interfaces, since no License Key is required.

SetPathToMatchUpFiles

This function accepts a string value indicating the file path to the folder containing the MatchUp Object files.

This function must be called before calling the InitializeDataFiles function.

To provide maximum compatibility with Windows, three files are installed in your ‘Common App Data’ directory.

Windows Vista and newer
C:\ProgramData\MelissaDATA\MatchUp.
Windows XP
C:\Documents and Settings\All Users\Application Data\Melissa DATA\MatchUp

The location of this directory can be changed by users so please note this, as it can often be the source of issues when running the samples/demos.

Syntax mdMC->SetPathToMatchUpFiles(char)
C mdMUMatchcodeSetPathToMatchUpFiles(mdMC, char)
.Net mdMC.SetPathToMatchUpFiles = string


InitializeDataFiles

This function opens the needed data files and prepares the MatchUp Object for use.

Before calling this function, you must have successfully called SetPathToMatchUpFiles function.

Check the return value of the GetInitializeErrorString function to retrieve the result of the initialization call. Any result other than “No Error” means the initialization failed for some reason.

This returns a value of the enumerated type ProgramStatus.

Value Enumeration Description
0 ErrorNone No error - Initialization was successful.
5 ErrorMatchcodeNotFound Specified Matchcode does not exist.

If any other value other than "ErrorNone" is returned, check the GetInitializeErrorString function to see the reason for the error.

Syntax ProgramStatus = mdMC->InitializeDataFiles()
C ProgramStatus = mdMUMatchcodeInitializeDataFiles(mdMC)
.Net ProgramStatus = mdMC.InitializeDataFiles


GetInitializeErrorString

This function returns a string to describe the error caused when the InitializeDataFiles function cannot be successfully called.

The possible strings returned by this method are:

  • "No Error"
  • "Could not open mdName.dat"
  • "Matchcode not found"
Syntax char = mdMC->GetInitializeErrorString()
C char = mdMUMatchcodeGetInitializeErrorString(mdMC)
.Net string = mdMC.GetInitializeErrorString