I’m writing a wrapper for a dll. The dll has a method whose signature resembles the following:
unsigned long aMethod(char **firstParameter, char **secondParameter))
aMethod returns string pointers to all parameters.
I’ve searching at google for a tutorial to give me insight on how to write the signature on C# so the framework can do the marshalling process.
How can it be written?
Do you know about any tutorial, book or documentation on this subject?
I got the answer:
The signature has to be like this:
Parameters should be declared as here:
And invocation is done as:
Marshalling and unmarshalling related to the strings as here:
Obviously, this marshalling has been selected based on dll´s API conventions.
I´m not sure after all, but all the problems had they source in the
CharsetandCallingConventionoptions…