search path redux - if office 2007 always uses a private riched20, why does wine interpose its own global one?

Dan Kegel dank at kegel.com
Fri Oct 16 23:15:00 CDT 2009


I think your approach is peachy, but Alexandre wanted a version
check; look at his most recent post in this thread:

>... The version of the native dll, compared to the builtin. I could imagine
>a heuristic where if the major version of native is higher than builtin
>you default to native or something like that. I'm sure there are other
>possibilities too.

On Fri, Oct 16, 2009 at 8:10 PM, Jeremy White <jwhite at codeweavers.com> wrote:
> I think we never pursued the question Dan posed in this subject line.
>
> That is, Powerpoint 2007 makes the following call:
> Call KERNEL32.LoadLibraryA(0033c0a8 "C:\\Program Files\\Common
> Files\\Microsoft Shared\\office12\\riched20.dll")
>
> It's clearly trying to load it's private dll.  Instead of loading that
> private copy, we
> load the builtin riched20 instead.  The builtin isn't 'good enough', and
> Powerpoint fails.
> Isn't that wrong?  Shouldn't we prefer an explicitly referenced native dll
> to a builtin,
> even in builtin,native load order?
>
> The attached proof of concept patch allows Powerpoint to display the
> troubled
> presentation.
>
> If I am on the right track, does it make sense to add a conformance test
> to create a bare bones %TEMP%\riched20.dll and load it?
>
> Cheers,
>
> Jeremy
>
> diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
> index 71d7ecd..ef66b50 100644
> --- a/dlls/ntdll/loader.c
> +++ b/dlls/ntdll/loader.c
> @@ -1977,6 +1977,9 @@ static NTSTATUS load_dll( LPCWSTR load_path, LPCWSTR
> libname, DWORD flags, WINE_
>     case LO_DEFAULT:  /* default is builtin,native */
>         nts = load_builtin_dll( load_path, filename, handle, flags, pwm );
>         if (!handle) break;  /* nothing else we can try */
> +        /* file is not a builtin library, if we we have a real file, try
> native */
> +        if (nts == STATUS_INVALID_IMAGE_FORMAT && handle && loadorder !=
> LO_BUILTIN)
> +            nts = load_native_dll( load_path, filename, handle, flags, pwm
> );
>         /* file is not a builtin library, try without using the specified
> file */
>         if (nts != STATUS_SUCCESS)
>             nts = load_builtin_dll( load_path, filename, 0, flags, pwm );
>
>



More information about the wine-devel mailing list