title: Equivalent for unsigned char * in c#
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/13991060/unsigned-char-equivalent-in-c-sharp-and-have-to-write-the-return-value-in-a-f">unsigned char ** equivalent in c# and have to write the return value in a file</a>  </p>
  </blockquote>
  
  
  
  <p>I have to call a win32 dll function</p>
  
  <pre><code>int func1(int arg1, unsigned char *arg2, int *arg3);
  </code></pre>
  
  <p>and i wrote wrapped c# as</p>
  
  <pre><code>public extern int fuc1(int arg1, out IntPtr arg2, out IntPtr arg3);
  </code></pre>
  
  <p>The arg2 has to allocate 2048 bytes and send it to the win32 dll. I'll get arg2 and arg3 as output.</p>
  
  <p>how can i declare in c# test application as well as c# wrapper. am i doing it right ?</p>