[Mono-bugs] [Bug 42021][Wis] Changed - DllImport/PInvoke does not deal correctly with A/W versions of functions.
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Mon, 12 May 2003 11:57:25 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by dietmar@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=42021
--- shadow/42021 Mon Apr 28 10:43:44 2003
+++ shadow/42021.tmp.15513 Mon May 12 11:57:25 2003
@@ -1,14 +1,14 @@
Bug#: 42021
Product: Mono/Runtime
Version: unspecified
-OS:
+OS: unknown
OS Details:
-Status: NEW
+Status: NEEDINFO
Resolution:
-Severity:
+Severity: Unknown
Priority: Wishlist
Component: misc
AssignedTo: mono-bugs@ximian.com
ReportedBy: japj@darius.demon.nl
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -66,6 +66,28 @@
CharSet.Auto
Platform invoke chooses between ANSI and Unicode formats at runtime, based
on the target platform.
So this functionality is probably missing in mono and explains why certain
SWT constructs work ok in MS .NET but not in Mono.
+
+------- Additional Comments From dietmar@ximian.com 2003-05-12 11:57 -------
+I added support for that, but I am not 100% sure if the Ansi lookup is
+right. I dont understand:
+
+-----------
+When the ExactSpelling object field is False, as it is by default in the
+Managed Extensions for C++ and C#, platform invoke searches for the
+unmangled name first (MessageBox), then the mangled name (MessageBoxA) if
+the unmangled name is not found. If a DLL contains both MessageBox and
+MessageBoxA, platform invoke selects MessageBoxA.
+--------------
+
+Does this mean we allways lookup both names?
+
+There is also a mcs/reflection bug, which makes my test case fail
+(mono/mono/tests/pinvoke13.cs). But I works when compiled with csc.
+
+
+
+
+