"I am wondering how does the c#
module expose itself to the C++ module"

In your C++ project, you may have added a reference to your C# .DLL
and then from your C++ code, you may have in there an "#include"
or "#using" directive somewhere. Check this link:

http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/7f0d2cf1-f018-47b5-9f9b-16f611c06320


I myself have written C# .dlls for a VB. net application and it works
like it should. ;)
The trick is to import the .net dll into your C++ project, mention its
namespace
in your C++ code, instantiate the class residing in that .net DLL,
then
call its method and you're done.


Cheers!


Benj

















On Jul 2, 6:44 am, Sue <[email protected]> wrote:
> Hi,
>
> I am a windows and c++ developer, but new to C#. I recently got a task
> to maintain a project that written using c++ and c#. Some modules are
> in c++ and some modules are in C#. The C++ module calls functions in
> C# module. At first, i can't step into the code in the C# module, I
> can now step into it after I changed the debugger type to be mixed.
> But I don't understand how it works. I am wondering how does the c#
> module expose itself to the C++ module, I didn't find any header file
> in the C++ modudle. All I see in the C++ module is a reference to the
> C# module. MyTalk is a namespace in the C# module and IProvide is a
> interface inside the namespace. The C# module is built as a DLL and
> sitting in the same location as the c++ module calling it.
>
> gcroot< MyTalk::IProvider^ >        m_Provider;
>
> Another example is
>
> SystrayUI::Systray::Callback();
>
> I only see reference.  How does this reference get resolved? Can
> someone explain and maybe also point me an article or book to read in
> order to understand this ?Thanks.

Reply via email to