I am calling a VB6 dll from a vb.net windows application that returns an array of strings. My issue is it seems to truncate after a NULL character.
For Example VB 6 is returning a string with the HEX value of 4E 31 00 00 01 00 20 20 20 20 20 00 00 00 20 20 20 31 32 30
But when it gets back to Vb.net all I have is 4E 31 or ??? N1???
Now I can return the same string as a return value of a function and I get it all.
Please Help,
Patrick Horn
---
Patrick,
>But when it gets back to Vb.net all I have is 4E 31 or â N1â?
Are you sure about that? How long is the string on the managed side
(as indicated by the .Length property)? The debugger may cut off the
content at the first null character even if the actual string is
longer.
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
DotNetJunkies User - 13 Apr 2004 18:18 GMT
Yes, .Length returns 2. The acutal data returned is N1, when posting to the message board some garbage got in the place of quote signs that where around the N1.
Thanks,
Pat
---