I have a method in an unmaged COM object that I am trying to sort:
STDMETHOD(SomeMethod)(LPSTR** items, INT* numOfItems) = 0;
But I can not find the right way to infer LPSTR ** elements. It should be a list of items. However, if you try to do something like this:
[PreserveSig] int SomeMethod([MarshalAs(UnmanagedType.LPStr)]ref StringBuilder items, ref uint numOfItems);
I get only the first letter of the very first element and nothing more.
How can I correctly transfer the LPSTR ** variable?
source share