Com interop: arrays with NULLS truncating when returned to vb.net

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: DotNetJunkies User (User_at_-NOSPAM-DotNetJunkies.com)
Date: 04/09/04


Date: Fri, 09 Apr 2004 13:50:08 -0700

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

---
Posted using Wimdows.net NntpNews Component - 
Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.


Relevant Pages

  • Unexpected error writing metadata to file
    ... Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. ...
    (microsoft.public.dotnet.academic)
  • transact sql question - returning x rows
    ... Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. ...
    (microsoft.public.sqlserver.programming)
  • leave it to a Indian
    ... Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: UAB on compact Framework?
    ... Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: SQL 2000 install fails - Drivers SQLAllocHandle on SQL_HANDLE_ENV
    ... Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. ...
    (microsoft.public.sqlserver.odbc)