[13/13] fusion: Add tests for the IAssemblyEnum interface.

Paul Vriens paul.vriens.wine at gmail.com
Thu Feb 19 10:52:40 CST 2009


Hans Leidekker wrote:
>  -Hans
> 
> 
> ------------------------------------------------------------------------
> 
> 
Hi Hans,

These tests crash on Vista with .NET 3.5 (not sure about other platforms/.NET 
versions yet). The enum_gac_assemblies function relies on the fact that 
ffd.cFileName contains 2 underscores. On Vista however I see some assemblies 
with a different format for the cFileName like:

6.0.0.0_en_31bf3856ad364e35

This explains the (first) crash as we dereference a pointer. So doing something 
like this fixes that piece:

          else if (depth == 1)
          {
-            ptr = strstr(ffd.cFileName, "__");
+            CHAR version[MAX_PATH];
+
+            lstrcpyA(version, ffd.cFileName);
+            ptr = strstr(version, "_");
              *ptr = '\0';
-            ptr += 2;
+            ptr = strrchr(ffd.cFileName, '_');
+            ptr += 1;
              sprintf(buf, "Version=%s, Culture=neutral, PublicKeyToken=%s",
-                    ffd.cFileName, ptr);
+                    version, ptr);

This seems to work fine but than it crashes again while trying to free the 
memory "HeapFree(GetProcessHeap(), 0, asmname->data);" in test_enumerate.

Just ignoring those HeapFree's doesn't fix it as we crash again later on.

-- 
Cheers,

Paul.



More information about the wine-devel mailing list