Rich Edit DLL hell (long)
From: John Furlong (jfurlong_nospam_at_merlon.com)
Date: 11/05/03
- Next message: Peter Haas: "Re: Delphi Object in DLL - does this work?"
- Previous message: Neil Howie: "Under Delphi"
- Next in thread: Peter Below (TeamB): "Re: Rich Edit DLL hell (long)"
- Reply: Peter Below (TeamB): "Re: Rich Edit DLL hell (long)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 5 Nov 2003 11:33:58 -0500
Hi all,
D7 Pro. Win 9x
The app. I am working on uses several TRichEdit components (for my sins),and
it requires use of the ITextDocument interface, which according to the MS
SDK is supported starting at V2.
On my XP development environment everything works as expected.
However, when QA tested on Win98 the application gets an exception on:
Editor.Perform(EM_GETOLEINTERFACE, 0, lparam(@ole));
doc := ole as ITextDocument;
The exception indicates that the interface is not supported.
This lead me to believe that V1 was being used on th Win98 machine.
I found RICHED32.DLL, and RICHED.DLL (16 bit?) installed, but not
RICHED20.DLL.
So, I installed the V3 version (RICHED20.DLL) - had to do this by installing
MS installer - what a crock!
Anyway, the problem did not go away.
So, I looked in ComCtrls at the TCustomRichEdit.CreateParams procedure which
explicitly loads the RICHED32.DLL (version 1) DLL and uses RICHEDIT as the
window class. This leads me to believe that it will ignore the fact that v2
or higher is available and always use V1.
As an aside, it is interesting to note that D7 is not supported on Win 95,
yet all other versions of Windows support at least V2, but D7 still uses V1.
I suspect that the app. works on XP because V1 is emulated and ITextDocument
is supported by the DLL.
So to my question (at last). How do I get TRichEdit to load V2?
TCustomRichEdit.CreateParams depends on a global variable FRichEditModule
declared in the implementation section of ComCtrls, and a local const
RichEditModuleName to define the DLL file name.
What I would like it to do is to try to load the possible DLLs in order of
MSFEDIT (v4.1) RICHED20 (V3 or V2) then RICHED32 (V1), and redistribute V3
RICHED20.DLL with my app.
The only way I seem to be able to do this is to create a modified version of
the ComCtrls.Pas source and compile it into my program, and distribute the
MS Windows Installer in order to install the correct version of
the DLL. This is extremely distasteful!
Does anyone have advice to offer,
If you reached this far, thanks for your patience.
John
- Next message: Peter Haas: "Re: Delphi Object in DLL - does this work?"
- Previous message: Neil Howie: "Under Delphi"
- Next in thread: Peter Below (TeamB): "Re: Rich Edit DLL hell (long)"
- Reply: Peter Below (TeamB): "Re: Rich Edit DLL hell (long)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|