Returning char* / System.String array from unmanaged c++ dll into a c# application

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Mark Ingram (mark.ingram_at_nexsan.com)
Date: 02/13/04


Date: Fri, 13 Feb 2004 11:14:54 -0000

Hi,

how can i return an array of strings from an unmanaged c++ dll into a c#
application?

cheers

Mark



Relevant Pages

  • Re: Please help optimize (and standarize) this code...
    ... > Mark F. Haigh wrote: ... But the reason I didn't use an array of strings in the ... What's the biggest number of elements that your array can have? ...
    (comp.lang.c)
  • passing an array of LPSTR to C++ by reference
    ... I have written a VB program that passes an array of strings to a C++ ... The c++ dll is supposed to fill the array of strings with the ... GetJobIds(LPSTR & strReturnedJobId, int ...
    (comp.lang.cpp)
  • Marshaling array of strings from C to C#
    ... We are developing a dll written in C to access some legacy stuff. ... situation it needs to return an array of strings, and in another, an array ... interface so that standard marshalling can automatically free it. ... is returning the array of strings as LPSTR* with each string NULL ...
    (microsoft.public.dotnet.framework.interop)
  • Re: C++ DLL in C# returning a char**
    ... array of managed System::String objects. ... I have a DLL written in C++ that has the following function exported ... returned in the char**. ... The return value is an array of strings ...
    (microsoft.public.dotnet.framework.interop)
  • Re: New to DLLs
    ... How I generally do it is to have an Array of Objects in the main Unit ... parameter, in the DLL ... however they can be passed back very nicely as strings in OleVariants ... This is because OleVariants use a different system for memory ...
    (comp.lang.pascal.delphi.misc)