Re: [Mono-list] Trouble with utf-16 marshaling

2007-07-02 Thread Maser, Dan
the links in case any brave souls would like to take a look. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Jordan Sent: Friday, June 29, 2007 9:02 PM To: Mono-list@lists.ximian.com Subject: Re: [Mono-list] Trouble with utf-16 marshaling Hi Dan

Re: [Mono-list] Trouble with utf-16 marshaling

2007-07-02 Thread Maser, Dan
it a try. Dan Maser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maser, Dan Sent: Monday, July 02, 2007 11:16 AM To: Mono-list@lists.ximian.com Subject: Re: [Mono-list] Trouble with utf-16 marshaling Thanks to the ideas suggested by those who

[Mono-list] Trouble with utf-16 marshaling

2007-06-29 Thread Maser, Dan
My situation is this: I've got a C library that has a lot of UTF-16 inputs and outputs. The C type is always unsigned short* or const unsigned short* (because clearly wchar_t* isn't portable because it's 4 bytes on linux). All of my C# code has the [MarshalAs(UnsignedType.LPWStr)]

Re: [Mono-list] Trouble with utf-16 marshaling

2007-06-29 Thread Maser, Dan
mean anything to anyone? As always, thanks for any help. Dan Maser. From: Maser, Dan Sent: Friday, June 29, 2007 1:10 PM To: Maser, Dan; 'mono-list@lists.ximian.com' Subject: RE: [Mono-list] Trouble with utf-16 marshaling Furthermore, I see

Re: [Mono-list] Trouble with utf-16 marshaling

2007-06-29 Thread Andy Hume
it, or is something else the problem? Andy _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maser, Dan Sent: 29 June 2007 23:23 To: Maser, Dan; mono-list@lists.ximian.com Subject: Re: [Mono-list] Trouble with utf-16 marshaling I have debugged this some more, and found

Re: [Mono-list] Trouble with utf-16 marshaling

2007-06-29 Thread Maser, Dan
:[EMAIL PROTECTED] Sent: Friday, June 29, 2007 6:13 PM To: Maser, Dan; mono-list@lists.ximian.com Subject: RE: [Mono-list] Trouble with utf-16 marshaling If the string argument is mutable then I believe one should use a StringBuilder -- with its capacity set, and that length passed to the native

Re: [Mono-list] Trouble with utf-16 marshaling

2007-06-29 Thread Robert Jordan
Hi Dan, Maser, Dan wrote: Here are you speaking about out marshaling: It works properly in windows with MS .NET, but doesn't work for me in linux with mono. I've verified in gdb that the C library is returning the correct string, but immediately after the C dll returns and mono does