[Mono-bugs] [Bug 661917] New: UnmanagedType.VBByRefStr marshalling is unimplemented
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Dec 30 16:44:00 EST 2010
https://bugzilla.novell.com/show_bug.cgi?id=661917
https://bugzilla.novell.com/show_bug.cgi?id=661917#c0
Summary: UnmanagedType.VBByRefStr marshalling is unimplemented
Classification: Mono
Product: Mono: Runtime
Version: 2.6.x
Platform: x86-64
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: interop
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: madewokherd at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=406630)
--> (http://bugzilla.novell.com/attachment.cgi?id=406630)
test case
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13)
Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13
Attempting to call a platform invoke with UnmanagedType.VBByRefStr raises a
NotImplementedExceptin: string marshalling conversion 34 not implemented
AFAICT, this should do the following when given a string reference:
* Create a buffer large enough to hold an ANSI string copy of the given string
(and probably a null terminator).
* Copy the string to that buffer.
* Call the function.
* Create a new string based on the contents of the buffer.
* Assign that new string to the given reference.
This is apparently intended to duplicate the behavior of VB6, which would do
roughly the same thing, except that it could modify strings in place. (Oddly
enough, VB6 Declare statements only natively supported functions expecting ANSI
strings, even though VB6 strings were wide strings internally.)
I'm attaching a test program.
Reproducible: Always
Steps to Reproduce:
Run the test program.
Actual Results:
** (vbbyrefstr.exe:14277): WARNING **: string marshalling conversion 34 not
implemented
Unhandled Exception: System.NotImplementedException: string marshalling
conversion 34 not implemented
Expected Results:
False
40
source str
40
False
True
System.AccessViolationException: Attempted to read or write protected memory.
Th
is is often an indication that other memory is corrupt.
at VBByRefStrTest.CopyMemory(String& dest, String& src, Int32 length)
at VBByRefStrTest.Main(String[] argv)
True
--
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