Spellex SDK for ActiveX - Technical Support
Applies to: All versions
When two or more applications that use Spellex ActiveX 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 Spellex ActiveX 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, Spellex ActiveX 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 Spellex ActiveX 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.
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.
Application B is installed after Application A. Application B sets
MainDictionaryFiles to "\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,
Spellex ActiveX 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 Spellex ActiveX in \Program
Files\ApplicationB\, because that was the last place in which Spellex ActiveX
was registered. That folder contains no dictionary files. Because
Spellex ActiveX 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:
Both Application A and Application B specified no paths to the
dictionary files in MainDictionaryFiles, and they installed the same
dictionary files to the same folder in which they registered wspell.ocx.
Both Application A and Application B specified full paths to the
Application A was installed after Application B, since Spellex ActiveX would
be registered in Application A's spelling folder. Application A's
instance of Spellex ActiveX would use the dictionary files in \Program
Files\ApplicationA\spelling, and Application B's instance would use
the dictionary files in \Program Files\ApplicationB\dicts.
Both Application A and Application install and register wspell.ocx in
a common location (such as the System32 directory).
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:
Re-register your application's copy of wspell.ocx. This can be done
by running regsvr32 via the command prompt (console) like this:
regsvr32 <path to your application's copy of wspell.ocx>\wspell.ocx
This may cause problems with other application's instance of Spellex ActiveX,
however, if it also uses relative paths to the dictionary files.
Copy the dictionary files used by your application to the folder
containing the registered copy of wspell.ocx. Finding that folder may
be difficult; one method is to search using Windows Explorer.
Symptom: Your application installs Spellex ActiveX 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 Spellex ActiveX 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.
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 Spellex ActiveX 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 Spellex ActiveX is installed, it will install and
register its own copy of Spellex ActiveX. At that point, any other
applications which use Spellex ActiveX 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 Spellex ActiveX
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,
Spellex ActiveX 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, Spellex ActiveX 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. Spellex ActiveX 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 Spellex ActiveX, but Spellex ActiveX will search for its dictionary files
in the folder you specify.