How to link C# and C++ assemblies into a single executable?

前端 未结 3 2080
情深已故
情深已故 2020-12-08 11:54

I have VS2008 solution containg a project that generates a C# executable that references a project that generates a dll containing both C++/CLI and unmanaged C++.

I

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 12:39

    Your business case is very similar to SQLite, so the same approach should work for you. Basically they insert the managed assembly into the unmanaged dll as a separate data section. They are then able to p/invoke the unmanaged dll from the managed dll in the normal way. It is also possible to dynamically link to the unmanaged code in the dll.

提交回复
热议问题