Have Unmanaged c++ code call managed c++ code that calls c# code -


i'm having trouble figuring out how reference managed c++ code calls c# code unmanaged c++ code. let me throw out few scenarios:

  1. i have unmanaged code reference , call managed code, managed code's call c# code commented out, builds , works fine. uncomment c# code, compiler errors saying c# namespace doesn't exist.
  2. in unmanaged code comment out reference , call managed code. managed code calls c# code. builds , runs fine... picture here.

compiler error c2653.

here's i'm doing:

unmanaged c++ code: i've set linker include managed c++ lib file.

#include "managedcpp.h"  managedcpp::foo(); 

managed c++:

extern "c" __declspec(dllexport) void __stdcall foo() {     csscode::bar(); } 

c#

public static void bar() {     // here initializes stuff registry      // data structures plan on marshaling      // other method calls, know involves placing     // things on stack can returned      // managed c++ code need marshed     // unmanaged c++ code.     // code static. } 

what doing wrong? far can tell need hide c# calls unmanaged code i'm not quite sure how that.

empty headed mistake.

i putting call managed c++ c# code in header. whoops. seems work fine now!


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -