title: How can I pass a .NET Bitmap to a native DLL?
body: <p>Here is what I have:</p>
  
  <ul>
  <li><p>An external DLL, I have written in C. This DLL links to opencv. I don't want to call OpenCV directly from C# - there are already huge amounts of C code accessing OpenCV which will be used in the DLL. There is an exported function: <strong>passbitmap(void *mem, size_t s);</strong></p></li>
  <li><p>A C# project from which I want to call the DLL.</p></li>
  <li>A System.Drawing.Bitmap object from which I want to pass the pixel/bitmap data somehow to my DLL.</li>
  </ul>
  
  <p>I guess its some kind of P/Invoke, but I have never done it, and don't know how can I do it properly in this case. How should I proceed? </p>