Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It's possible, but you can't pass a .NET object to a native DLL, which is a native C++ code... The equivalent of an .NET object in native C++ is C++ object... but this is like asking a C# to understand Native or PHP, or.... So, there are several approaches. </p> <p>Don't use C++ managed wrapper. Instead using Marsahling and C# interoperability directly call into native C++, in 1 of 2 ways:</p> <ol> <li>Pass the object fields as a long list of parameters to the C++ and re-construct the object inside native C++. A bit "not nice" approach but very efficient and easy to debug.</li> <li>You can also pass the object as a class pointer to the C++ native directly, you need first to create the right marshaling in C#. See here: <a href="http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal(v=vs.110).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal(v=vs.110).aspx</a></li> </ol> <p>Use C++ Interop (which you are doing...). You need to compile with Mixed mode! See this nice example: <a href="http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/f2de75c5-50a6-41ac-9ddf-694a8c0ce75b/" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/f2de75c5-50a6-41ac-9ddf-694a8c0ce75b/</a> BUT... you need to understand the basics and know how to compile it: <a href="http://msdn.microsoft.com/en-us/library/x0w2664k.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/x0w2664k.aspx</a></p> <p>Interoperability is a complex issue... and I try to write a short answer, please revert to me for further clarifications....</p>
    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. 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