I have a third party lib that has the following signature:
int GetError(char *Message, int Length)
Here the Message has to be a buffer of at least size Length, otherwise the function fails. How would one PInvoke this? I have tried Stringbuilder for the message, but here I cannot specify the length and the function fails.
The Message parameter is declared as an input parameter to the function.