RecogniContact/COM - International Address Parser - Class Parser
Using RecogniContact
Deploying RecogniContact
Class IContactParser
Class IParsedContact
Class IParserSettings
Sample code for C#
Sample code for C++
Sample code for Delphi
Sample code for Visual Basic (win32)
Sample code for Visual Basic .NET

Class IContactParser

The class IContactParser is the interface to RecogniContact's parsing engine.

Class Methods

void Initialize(string userName, string licenseKey);

Initializes the parser object with the specified license information.
IContactParser.Initialize() must have been called before you can use IContactParser.Parse()
Call IContactParser.Initialize() only once in your application.

IParsedContact Parse(string sourceText);

Parses the string in sourceText, and returns the parsing result as an IParsedContact object.
IContactParser.Initialize() must be called once before calling IContactParser.Parse()
The maximum length of sourceText is 8 kilobytes (8192 characters).

IParsedContact FindContactData(string sourceText);

First searches the string sourceText a blocks of text containing contact data, and then parses this block of text using the function Parse() (see above). If several contact information blocks are found within sourceText, FindContactData uses the one with the most details (= the highest number of all available contact fields). See IParsedContact for the list of contact fields.

IParserSettings CreateSettingsObject();
void Settings(IParserSettings settings);

Allow you to retrieve the current settings, or adjust the parser settings. To change parser settings, proceed as follows:
  1. Create the settings object:
    settingsObject = IContactParser.CreateSettingsObject()
  2. Change the settings object properties as required.
  3. Activate the settings using
See below for a list of source code samples.

string GetLicenseInfo(LicenseInfoType licenseInfo);

Retrieves Information about your RecogniContact license.
  • GetLicenseInfo(litUserName) returns the name of the registered license holder

  • GetLicenseInfo(litDaysLeft) returns a string containing the number of days remaining in your license
    "-1" if the license has no expiry date (permanent license)
  • "0" indicates that the license has already expired
  • "1" indicates that the license will expire today at midnight
  • "2", "3", ... indicates the number of days remaining in your license (including today)

  • GetLicenseInfo(litExpired) returns the license expiry status
    "1", if the license is expired
    "0", if the license is still valid

  • GetLicenseInfo(litParserCountries) returns a comma separated string containing the 2 letter ISO codes of all countries, for which the parser will parse address and contact information
    returns an empty string, if your license has no country restriction
    See for the complete list of ISO country codes.

void GetVersion(out int major, out int minor, out int release, out int build);

Retrieves the version of the parser installed. It is recommended to verify the RecogniContact version using GetVersion() if you use features that are not available in all versions of RecogniContact.
To manually identify the version of RecogniContact installed on a machine you can use the following method: In Windows Explorer, locate "RecogniContact.DLL", right click the file, click "Properties" and see "File version" on Tab "Details".


For a demo see the following source code samples: