Wintertree Software Inc.

WSpell ActiveX Spelling Checker

Home Site index Contact us Catalog Shopping Cart Products Support Search

You are here: Home > Support > WSpell > Preventing conflicts with other applications that use WSpell


Preventing conflicts with other applications that use WSpell

Applies to: All versions

When two or more applications that use WSpell are installed on the same system, various problems may arise that prevent one or both applications from working correctly. This document describes the solutions to specific problems, and contains some strategies for avoiding the problems.

Symptom: When your application is installed on a system on which another application which also uses WSpell is installed, either your application or the other application reports all words as misspelled or is unable to find the dictionary files.

Explanation: This problem occurs if one of the applications specifies full paths for dictionary files listed in the MainDictionaryFiles property, the other uses relative paths, and the applications register wspell.ocx in different folders. When the dictionary files listed in MainDictionaryFiles include relative (or no) paths, WSpell expects to find the files relative to the folder containing the registered copy of wspell.ocx. If the dictionary files are not found, they will not be opened and WSpell will report all words as misspelled (see Most or all words reported as misspellings for an explanation).

The problem can arise in a variety of ways, but here is one scenario that shows how it can happen.

  1. Application A is installed on a system first. Application A sets MainDictionaryFiles to "ssceam.tlx,ssceam2.clx". It installs wspell.ocx, ssceam.tlx, and ssceam2.clx in \Program Files\ApplicationA\spelling. It also registers wspell.ocx in that folder.

  2. Application B is installed after Application A. Application B sets MainDictionaryFiles to "\Program Files\ApplicationB\dicts\ssceam.tlx,\Program Files\ApplicationB\dicts\ssceam2.clx". It installs and registers wspell.ocx in \Program Files\ApplicationB\. It installs ssceam.tlx and ssceam2.clx in \Program Files\ApplicationB\dicts.

After Application B is installed, Application A will begin reporting all words as misspelled because it will be unable to open its dictionary files. Because Application A specified relative paths (actually, no paths) for the dictionary files in MainDictionaryFiles, WSpell will expect to find the dictionary files in the folder containing the registered copy of wspell.ocx. Application B registered wspell.ocx in \Program Files\ApplicationB\, which contains no dictionary files. Multiple copies of the same ActiveX control can be installed on a system, but only one can be registered; whichever one was last registered is the one that is used by all applications that use the ActiveX control. After Application B was installed, Application A would begin using the copy of WSpell in \Program Files\ApplicationB\, because that was the last place in which WSpell was registered. That folder contains no dictionary files. Because WSpell will be unable to find the dictionary files in that folder, no dictionaries will be open and all words will be reported as misspelled.

Note that the problem would not occur if:

Solutions:

If your application uses relative (or no) paths in the dictionary files set in MainDictionaryFiles, and an end-user is reporting problems after another application was installed, you may be able to correct the problem in the following ways:

Symptom: Your application installs WSpell into a common folder such as System32. After another application is installed, an error message similar to ""'wspell.ocx' or one of its dependencies not correctly registered: a file is missing or invalid" appears when your application runs.

Explanation: The other application installed a later version of WSpell on top of the copy of wspell.ocx installed by your application. The later version is not compatible with the version used by your application, so an error occurs.

Solution: Re-install the version of wspell.ocx used by your application, but this time install it in a folder specific to your application. After wspell.ocx is installed, run regsvr32, specifying the path to the copy of wspell.ocx in your application's folder on the command line.

Strategies

Rather than installing wspell.ocx to a common folder (such as System32), install and register it in your application's folder.

Multiple copies of an ActiveX control such as WSpell can be installed on the same system. However, only one of those copies can be registered at a time. Whichever copy was last registered is the one used by all applications which share that ActiveX control. When a new application that uses WSpell is installed, it will install and register its own copy of WSpell. At that point, any other applications which use WSpell will use the copy installed and registered by the new application. Normally, this isn't a problem, as each copy is identical or nearly so, and it doesn't matter which one an application uses. Note that as of version 5.13, versions of WSpell that are incompatible with other versions will use different CLSIDs, meaning they are effectively different controls.

If the dictionary file names listed in the MainDictionaryFiles and UserDictionaryFiles properties contain relative paths or no paths, WSpell will expect to find them in the same folder in which the registered copy of wspell.ocx resides. If a different copy of wspell.ocx is later registered by another application, WSpell will attempt to find its dictionaries relative to (or in) the folder containing the other copy of wspell.ocx. If the dictionary files cannot be found, the spelling checker in your application will not work. The best strategy to avoid this situation is to specify full paths to the dictionary files in MainDictionaryFiles and UserDictionaryFiles:

MainDictionaryFiles = "\Program Files\myapp\dicts\ssceam.tlx,\Program Files\myapp\dicts\ssceam2.clx"

If you specify dictionary files this way, it will not matter where the registered copy of wspell.ocx is located. WSpell will locate the dictionary files where you tell it to (\Program Files\myapp\dicts in the example above). If a new application installs and registers wspell.ocx in a different folder, your application will begin using that copy of WSpell, but WSpell will search for its dictionary files in the folder you specify.


Home Site index Contact us Catalog Shopping Cart Products Support Search


Copyright © 2015 Wintertree Software Inc.