Sentry Spelling Checker Engine - Support
You are here: Home > Support > Sentry Spelling Checker Engine > Using an INI file
Product: Sentry Spelling Checker Engine Windows SDK
Description: This document describes and clarifies use of an INI file with the Sentry Windows DLL.
By default, the 32-bit Sentry DLL (ssce5x32.dll) reads and writes its settings in the system registry. "Settings" include the names of dictionary files to open and options to enable. The Sentry programmer's guide generally refers to settings as "properties." Although it uses the system registry by default, the Sentry DLL will read and write its settings from an INI file instead if your application calls SSCE_SetIniFile.
The call to SSCE_SetIniFile should occur before any other SSCE_* calls, except the call to SSCE_SetKey (in other words, call SSCE_SetKey first, then SSCE_SetIniFile). Calling SSCE_SetIniFile tells the Sentry DLL two things:
It should read and write its settings from/to an INI file instead of the system registry;
The name of the INI file to access its settings from.
If the name of the INI file you pass to SSCE_SetIniFile contains no path (e.g., SSCE_SetIniFile("ssce.ini")), the Sentry DLL will search for the INI file as described in the programmer's guide under "How the Sentry DLL locates the INI file" in the "Using the Sentry Windows SDK chapter. Sometimes this causes problems, however:
If the INI file is not located in one of the places the Sentry DLL (or Windows) searches, it will not be found.
If another INI file of the same name is found first, that INI file will be used with potentially unexpected results.
Both of these situations can result in confusing and difficult-to-diagnose problems, such as failure to open dictionary (lexicon) files. Consequently, we recommend that you pass a full path to the INI file like this:
The INI file doesn't have to be called ssce.ini. In fact, you can store Sentry settings in the same INI file used to store your application's settings. The Sentry DLL (version 5.11 and later) reads and writes settings in the [SSCE User] section of the INI file file (versions 5.10 and earlier access settings in the [SSCE] section). Here's an example INI file which shows Sentry settings coexisting with other application settings:
Copyright © 2015 Wintertree Software Inc.