Discussion:
disabling wow64, testing 64-bit wine-mono P/invoke
Hin-Tak Leung
2015-09-15 03:14:24 UTC
Permalink
Hi,
I am not having any luck trying to disable wow64 temporarily
to test 64-bit wine-mono P/invoke .

I tried moving syswow64, removing 32-bit wine, moving wow32.dll,
etc. It either insists on p/invoking 32-bit dlls, or not recognizing
the .net assembly at all.

What I like to do is to test a pure 64-bit code-path -
starting with neutral .net assembly, p/invoke to 64-bit dll's.

This is possible on windows - in fact cmd.exe on
win 8 64-bit will refuse to p/invoke to 32-bit dll's.

Is there any way of doing this with 64-bit wine and 64-bit wine-mono?

Hin-Tak
Vincent Povirk
2015-09-16 02:45:51 UTC
Permalink
Post by Hin-Tak Leung
Is there any way of doing this with 64-bit wine and 64-bit wine-mono?
Currently, Wine does not have the ability to load pure .NET PE images
in a 64-bit process.

Ntdll needs to call _CorValidateImage during the loading process.
_CorValidateImage needs to convert the image, in memory, to the
correct architecture.

It's complicated, and I don't have a solution.
Hin-Tak Leung
2015-09-16 03:58:14 UTC
Permalink
------------------------------
Post by Vincent Povirk
Post by Hin-Tak Leung
Is there any way of doing this with 64-bit wine and 64-bit wine-mono?
Currently, Wine does not have the ability to load pure .NET PE images
in a 64-bit process.
Ntdll needs to call _CorValidateImage during the loading process.
_CorValidateImage needs to convert the image, in memory, to the
correct architecture.
It's complicated, and I don't have a solution.
Actually you do :-).

Using
http://madewokherd.nfshost.com/omgsecret/mono-64bit-exe.tar.gz
from
https://bugs.winehq.org/show_bug.cgi?id=30518

It is a bit dated, but does the job.

I was very confused by both of
libmono-2.0-x86_64.dll libmono-2.0-x86.dll MonoPosixHelper-x86_64.dll MonoPosixHelper-x86.dll
in c:/windows/mono/mono-2.0/bin/

In fact libmono-2.0-x86_64.dll MonoPosixHelper-x86_64.dll
are never used, at the moment.

When 64-bit mono loads a .NET PE image which then P/Invoke,
it does so P/Invoke to 64-bit dlls.
Vincent Povirk
2015-09-16 04:02:11 UTC
Permalink
Post by Hin-Tak Leung
I was very confused by both of
libmono-2.0-x86_64.dll libmono-2.0-x86.dll MonoPosixHelper-x86_64.dll MonoPosixHelper-x86.dll
in c:/windows/mono/mono-2.0/bin/
In fact libmono-2.0-x86_64.dll MonoPosixHelper-x86_64.dll
are never used, at the moment.
Correct. Alexandre insisted we include 64-bit builds anyway. In
theory, they would work if Wine had everything required.

Loading...