Hans Leidekker : fusion: Enumerate 64-bit assemblies.

Alexandre Julliard julliard at winehq.org
Tue May 22 14:21:29 CDT 2012


Module: wine
Branch: master
Commit: be9459a948097ddaa780745ae2374a320cabd1ed
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=be9459a948097ddaa780745ae2374a320cabd1ed

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Tue May 22 10:10:01 2012 +0200

fusion: Enumerate 64-bit assemblies.

---

 dlls/fusion/asmenum.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/dlls/fusion/asmenum.c b/dlls/fusion/asmenum.c
index e4f73e8..1d4de5b 100644
--- a/dlls/fusion/asmenum.c
+++ b/dlls/fusion/asmenum.c
@@ -21,6 +21,8 @@
 #include <stdarg.h>
 
 #define COBJMACROS
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
 
 #include "windef.h"
 #include "winbase.h"
@@ -384,8 +386,10 @@ static HRESULT enumerate_gac(IAssemblyEnumImpl *asmenum, IAssemblyName *pName)
 {
     static const WCHAR gac[] = {'\\','G','A','C',0};
     static const WCHAR gac_32[] = {'\\','G','A','C','_','3','2',0};
+    static const WCHAR gac_64[] = {'\\','G','A','C','_','6','4',0};
     static const WCHAR gac_msil[] = {'\\','G','A','C','_','M','S','I','L',0};
     WCHAR path[MAX_PATH], buf[MAX_PATH];
+    SYSTEM_INFO info;
     HRESULT hr;
     DWORD size;
 
@@ -394,6 +398,15 @@ static HRESULT enumerate_gac(IAssemblyEnumImpl *asmenum, IAssemblyName *pName)
     if (FAILED(hr))
         return hr;
 
+    GetNativeSystemInfo(&info);
+    if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
+    {
+        strcpyW(path, buf);
+        strcpyW(path + size - 1, gac_64);
+        hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, path);
+        if (FAILED(hr))
+            return hr;
+    }
     strcpyW(path, buf);
     strcpyW(path + size - 1, gac_32);
     hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, path);
@@ -411,6 +424,14 @@ static HRESULT enumerate_gac(IAssemblyEnumImpl *asmenum, IAssemblyName *pName)
     if (FAILED(hr))
         return hr;
 
+    if (info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
+    {
+        strcpyW(path, buf);
+        strcpyW(path + size - 1, gac_64);
+        hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, path);
+        if (FAILED(hr))
+            return hr;
+    }
     strcpyW(path, buf);
     strcpyW(path + size - 1, gac_32);
     hr = enum_gac_assemblies(&asmenum->assemblies, pName, 0, path);




More information about the wine-cvs mailing list