Marshaling char ** from dll in c#?

I have a third party DLL. One function (properly exported) is declared:

int GetObects(char ** str, int len)
{
}

Anyone know how to declare that in c#?

(I can’t recall the proper syntax for cdecl right now, so assume that it has been properly declared and exported and focus on the char** part)

OK, it seems to be as simple as:

[DllImport(“YourDllName.dll”)]
public static extern int GetObjects(ref string data, int length);

// To call it…

string theData = string.Empty;

// Pad the string just in case
theData = theData.PadLeft(101,’ ');

GetObjects(ref theData, 100);

I haven’t fully tested it yet, but so far that is what I’m coming up with.