title: Use a C struct in C++/CLI, calling conventions issue
body: <p>I'm using <a href="http://www.libusb.org/" rel="nofollow">lib_usb</a> in my C++/CLI project, and I need to use it's functions <code>usb_get_busses</code> and some others in my managed C++/CLI code.</p>
  
  <p>Using a managed <code>AutoPtr</code> to create the <code>usb_bus</code> struct as follows:</p>
  
  <p><code>AutoPtr&lt;struct usb_bus&gt; bus;</code></p>
  
  <p>now I need to call the <code>usb_get_busses</code> function, however the linker seems to be unhappy as to the calling conventions.  The CLR uses the clrcall calling convention, and obviously C using <code>__cdecl</code>.  </p>
  
  <p><code>usb_bus* usb_get_busses(void)</code> &lt;--- the signature of the C function.</p>
  
  <p>Now how do I make myself able to use the <code>lib_usb</code> in C++/CLI?  Do I have to create a C++/CLI wrapper or something?</p>
  
  <p>The linker spits out this message:</p>
  
  <blockquote>
    <p>error LNK2031: unable to generate p/invoke for "extern "C" struct
    usb_bus * __clrcall usb_get_busses(void)"
    (?usb_get_busses@@$$J0YMPAUusb_bus@@XZ); calling convention missing in
    metadata</p>
  </blockquote>