[Mono-bugs] [Bug 360363] New: Incorrect Behavior: P/ Invoke 64-Bit Library on 32-Bit System

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Feb 9 13:31:10 EST 2008


           Summary: Incorrect Behavior: P/Invoke 64-Bit Library on 32-Bit
           Product: Mono: Class Libraries
           Version: 1.2.6
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: dominik.reichl at gmx.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Created an attachment (id=194019)
 --> (https://bugzilla.novell.com/attachment.cgi?id=194019)
Screenshot, source code and 64-bit DLL for testing

Description of problem: When trying to P/Invoke a 64-bit native DLL file on a
32-bit Windows system, Mono's behavior is different from Microsoft .NET's.

Steps to reproduce the problem: Download the ZIP in the attachment. Compile the
CS file using "mcs PInvokeBug.cs". Run the generated EXE file on a 32-bit
Windows system.

Actual results: Mono shows 8 message boxes (all the same; see German language
screenshot MessageBox.png in the ZIP), and finally throws a

Expected results: No message boxes should be shown; a
System.BadImageFormatException should be thrown (instead of

How often does this happen? Always.

Additional information: The KeePassLibC64.dll file in the ZIP is from the
KeePass Password Safe project (the call to DeleteManager with IntPtr.Zero won't
do anything). Feel free to use any other 64-bit native DLL file for testing, if
you don't trust this one.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list