Hi,
I don't think there's an easy way to marshal STL template classes. I see
people are having problems even with regular string arrays. You can probably
set out to write a custom marshaler, but it's a LOT of pain IMO. I'd stick
to regular string arrays when doing C++ <-> C# interop.
--
Regards,
Dmytro Lapshyn [MVP]
http://blogs.vbcity.com/DmytroL [quoted text, click to view] "SONET" <SONET@discussions.microsoft.com> wrote in message
news:A33341FF-7CC2-4B39-A873-3C4070B27635@microsoft.com...
> I'm a newbie to marshalling, what's the best way to call the following C++
> function
> from C#?
>
> void foo(const vector<string> name) ?
>
> I've tried doing a
>
> [DllImport("test.dll"), CharSet = CharSet.Ansi)]
> public static extern void foo(ArrayList name);
>
> but that didn't work.