Thank you very much. I will check what goes wrong there and fix the patch tomorrow.<br><div class="gmail_quote"><div dir="ltr">On Fri, 22 Jan 2016 at 01:33, Vincent Povirk <<a href="mailto:madewokherd@gmail.com">madewokherd@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I took a different approach to testing this, and it doesn't seem to be<br>
working quite right.<br>
<br>
Instead of building x64 class dll's, I hacked something together based<br>
on wine-staging's related patches, mono's implementation of<br>
_CorValidateImage, and disabling a check in wineserver. I'm attaching<br>
a diff of that.<br>
<br>
Instead of working around managed c++ issues, I looked for a way to<br>
use dll fixups more directly from a C# library:<br>
<a href="https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports" rel="noreferrer" target="_blank">https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports</a><br>
<br>
So I have a C# dll that exports an "add" function, like the example,<br>
and a win32 console exe that calls it via LoadLibrary/GetProcAddress.<br>
On Windows, I can call it multiple times and then exit with no<br>
problems. In Wine with your patch, everything works except that the<br>
result is incorrect the first time add() is called. I suspect<br>
ReallyFixupVTable is changing some registers, and the thunk will have<br>
to preserve them.<br>
<br>
Thanks for working on this, by the way. Seeing this *almost* work even<br>
for a simple test case is very cool. :)<br>
</blockquote></div>