title: What is the best way to wrap unmanaged C++ classes so they can be consumed by .Net managed client applications?
body: <p>We have a win32 C++ unmanaged library (which calls Boost and openCV under the covers).
  The library contains several public class definitions.
  The classes themselves expose several methods who's parameters include vectors, shared pointers
  and callbacks as part of their method signatures.</p>
  
  <p>We would like to create a wrapper which would allow these classes to be consumed by .Net (managed) clients.
  We want to preserve support for our existing unmanaged client applications. So I guess this will have to be
  a separate DLL/library. Another consideration is performance marshaling across the managed/unmanaged 
  boundary. We'll be pushing byte arrays of images back and forth between the client app and libraries at 
  the rate of 30-50 times per second.</p>
  
  <p>What is the best approach for doing this?</p>
  
  <p>Can someone point me in the direction of any sample implementations, tutorials, strategies to get us started?
  The last time I looked at something like this was well over 10 years ago.
  I seem to vaguely remember pInvoke and the IJW works.</p>
  
  <p>Any ideas would be greatly appreciated.</p>
  
  <p>Thanks,
  JohnB</p>