C#–Invoke CPP method returning String

[DllImport("Cpp.dll")]
public static extern void GetString(ref StringBuilder sb, int length);

StringBuilder sb = new StringBuilder(128);
GetString(ref mySB, 128);

Leave a Reply

Your email address will not be published. Required fields are marked *