pInvoke with "unsigned char* buf" as parameter

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

Anyone have any ideas on how to Marshal this parameter in C#?

unsigned char* buf

TIA,

Patrick
 
Hi Patrick,
post it to the interop group including
the structures, signatures etc.

Regards,
stax
 
Patrick,

Generally speaking, that will be marshaled as a byte array, or as a
string.

However, if you are passing the buffer to be written to, and it is a
string, then you will have to pass a stringbuilder and not a string.

Hope this helps.
 
Anyone have any ideas on how to Marshal this parameter in C#?

As a string, StringBuilder or byte[] depending on how it's used.


Mattias
 
Back
Top