开发者

C# :- P/invoke signature

开发者 https://www.devze.com 2022-12-22 09:44 出处:网络
I have a dll with following signature in C++. It is working in c++; void Decompress(unsigned char *in,int in_len,unsigned char * out,

I have a dll with following signature in C++. It is working in c++;

    void Decompress(unsigned char *in,int in_len,unsigned char * out,
unsigned *o_len,int *e);

Description of parameter

  1. *in : It is byte array passed to function.
  2. in_len : Length of bytes in first parameter.
  3. *out : This would be the output as byte array.
  4. *o_len : No of bytes in third parameter
  5. *e : Error code returned

How c开发者_Go百科an I call it from c#?

What would be the P/Invoke declaration?


static extern void Decompress(
                byte[] input, 
                int in_len,
                byte[] output, 
                ref int o_len,
                out int e);
0

精彩评论

暂无评论...
验证码 换一张
取 消