Alexandre Julliard : ntdll: Prefer loading native manifests over Wine ones.
Alexandre Julliard
julliard at winehq.org
Mon Aug 29 11:28:31 CDT 2011
Module: wine
Branch: master
Commit: 127b27414eb151fe48aa16e05399e37c115446ac
URL: http://source.winehq.org/git/wine.git/?a=commit;h=127b27414eb151fe48aa16e05399e37c115446ac
Author: Alexandre Julliard <julliard at winehq.org>
Date: Sat Aug 27 14:42:49 2011 +0200
ntdll: Prefer loading native manifests over Wine ones.
---
dlls/ntdll/actctx.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index a539e54..d31a6a3 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -1801,6 +1801,7 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
static const WCHAR lookup_fmtW[] =
{'%','s','_','%','s','_','%','s','_','%','u','.','%','u','.','*','.','*','_',
'%','s','_','*','.','m','a','n','i','f','e','s','t',0};
+ static const WCHAR wine_trailerW[] = {'d','e','a','d','b','e','e','f','.','m','a','n','i','f','e','s','t',0};
WCHAR *lookup, *ret = NULL;
UNICODE_STRING lookup_us;
@@ -1852,8 +1853,21 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
tmp = strchrW(tmp, '.') + 1;
revision = atoiW(tmp);
if (build == min_build && revision < min_revision) continue;
- ai->version.build = min_build = build;
- ai->version.revision = min_revision = revision;
+ tmp = strchrW(tmp, '_') + 1;
+ tmp = strchrW(tmp, '_') + 1;
+ if (!strcmpiW( tmp, wine_trailerW ))
+ {
+ /* prefer a non-Wine manifest if we already have one */
+ /* we'll still load the builtin dll if specified through DllOverrides */
+ if (ret) continue;
+ }
+ else
+ {
+ min_build = build;
+ min_revision = revision;
+ }
+ ai->version.build = build;
+ ai->version.revision = revision;
RtlFreeHeap( GetProcessHeap(), 0, ret );
if ((ret = RtlAllocateHeap( GetProcessHeap(), 0, dir_info->FileNameLength + sizeof(WCHAR) )))
{
More information about the wine-cvs
mailing list