String[*] to string array

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JQD
    New Member
    • Feb 2007
    • 1

    #1

    String[*] to string array

    Greetings!
    I'm calling a DLL function from C# that returns a null terminated list of pointers to strings. The return type is 'object'.

    object o = thing.getNames( );

    In Visual Studio, the Autos window shows the returned value o as of type "object {string[]}". It shows the Value as "{Dimension s:[1..3]}". I can expand o and items [1] and [2] are the expected strings, of type "string".

    I don't understand how to access these, though. I can't seem to cast o to anything of use, an IntPtr from which I could get the string pointers, not to string[], not to object[], I can't say "IntPtr ip = Marshal.ReadInt Ptr(o);".

    Help appreciated.
Working...