[Mono-bugs] [Bug 636966] New: cannot P/Invoke with ordinal EntryPoint on Windows

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 3 08:11:36 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=636966

https://bugzilla.novell.com/show_bug.cgi?id=636966#c0


           Summary: cannot P/Invoke with ordinal EntryPoint on Windows
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.6.x
          Platform: x86
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: interop
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: joe at mistachkin.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=387417)
 --> (http://bugzilla.novell.com/attachment.cgi?id=387417)
complete solution with two projects (one managed, one native)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8)
Gecko/20100722 Firefox/3.6.8

When using the DllImport attribute with an ordinal EntryPoint (e.g. "#1"), the
resulting method cannot be successfully invoked (at least on Windows).

Complete source code for the repro is attached.


Reproducible: Always

Steps to Reproduce:
1. Compile the attached projects using VS2008.
2. Run the built EXE with Mono.

Actual Results:  

Unhandled Exception: System.EntryPointNotFoundException: #1
  at (wrapper managed-to-native) ConsoleApplication1.Program:foobarByOrdinal ()
  at ConsoleApplication1.Program.Main (System.String[] args) [0x00000] in
<filename unknown>:0


Expected Results:  
The following should be written to the console:

'#1' returned -559038737

-- 
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