Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There is more than just COM interop, the <strong><a href="http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/adce905c-2bd3-4276-be53-c644dd928dfa" rel="noreferrer">MSDN FAQ</a></strong> also lists lesser known methods:</p> <blockquote> <p><strong>2.2 How do I call .NET assembly from native Visual C++?</strong></p> <p>There are basically four methods to call .NET assembly from native VC++ code. Microsoft <a href="http://cfx.codeplex.com/" rel="noreferrer">All-In-One Code Framework</a> has working examples that demonstrate the methods.</p> <ol> <li><p>Native VC++ module calls <a href="http://msdn.microsoft.com/en-us/magazine/cc163567.aspx" rel="noreferrer">CLR Hosting APIs</a> to host CLR, load and call the .NET assembly. (All-In-One Code Framework Sample Code: CppHostCLR)</p></li> <li><p>If the .NET assembly can be exposed as a COM component, native VC++ module can call into the .NET assembly through .NET – COM interop. (All-In-One Code Framework Sample Code: CppCOMClient)</p></li> <li><p>Reverse PInvoke: the managed code call native passing a delegate the native code can call back. (All-In-One Code Framework Sample Code: CSPInvokeDll)</p></li> <li><p>If the module containing native VC++ code is allowed to <a href="http://msdn.microsoft.com/en-us/library/ms173265.aspx" rel="noreferrer">enable CLR</a>, the native VC++ code can call .NET assembly directly through the “It Just Works”, or “IJW”, mechanism. (All-In-One Code Framework Sample Code: CppCLIWrapLib)</p></li> </ol> </blockquote>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload