Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 May : Richedit: Why is a particular DLL version being loaded?

www.cryer.info
Managed Newsgroup Archive

Richedit: Why is a particular DLL version being loaded?

Subject:Richedit: Why is a particular DLL version being loaded?
Posted by:"Andrew Fiddian-Green" (..@dd)
Date:Mon, 21 May 2007 17:41:14

My application uses TJvxRichEdit controls.

In the source for these controls it calls LoadLibrary('RICHED20.DLL')
without any specification of the exact folder name.

My PC has three different versions of RICHED20.DLL on it in the following
folders:

C:\Program Files\Common Files\Microsoft Shared\OFFICE11
C:\Program Files\Common Files\Microsoft Shared\OFFICE12
C:\WINNT\SYSTEM32

According to my understanding, when the folder path is not fully specified
LoadLibrary() will load in C:\WINNT\SYSTEM32

But in reality it is loading the one in ...\OFFICE11 {note: I know this
since my application saves rich text to disk, and the resulting files
contain a \generator tag showing the version number of the rich edit being
used...}

Question: Why does Windows load the DLL in \OFFICE11 ? And why not the one
in \SYSTEM32 or \OFFICE12 ?

Regards,
AndrewFG

+++

PS I did notice that
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDLLs contains the
following entries, and the OFFICE11 one appears first...

C:\Program Files\Common Files\Microsoft Shared\OFFICE11\RICHED20.DLL
C:\Program Files\Common Files\Microsoft Shared\OFFICE12\RICHED20.DLL

+++

Replies:

www.cryer.info
Managed Newsgroup Archive