[Mono-list] DllImport ... help
15 Jun 2002 17:10:17 +0200
On Sat, 2002-06-15 at 16:32, Jonathan Pryor wrote:
> An MSDN sample might be worth looking at:
> It works for me on .NET, but I haven't been able to make it work with
> mono... I'm thinking that mono isn't ready for full-blown DllImport
> For example, the following works with .NET
> When I run either `managed.exe' (the mcs-compiled program) or
> `managed-net.exe' (the csc-compiled program) under .NET, I get the
> expected output:
> name: This is my message. Isn't it nice?
> When I run either `managed.exe' or `managed-net.exe' under mono, I get
> ** (process:13403): WARNING **: unhandled exception
> System.NullReferenceException: "A null value was found where an object
> instance was required"
> in <0x00065> .ghbn:Main ()
> RESULT: -1
> This implies to me that Mono does not properly handle PInvoke calls, at
> least currently. (CVS tree built around 9:00 AM this morning).
Confirmed with release 0.12
Supporting the Mono project, and helping you...
"First steps" building guides, CSAM the C Sharp Archived Modules
daily Mono RPMS, C# tutorial,...