如何实现Unmanaged C ++ dll和C#dll之间的实时通信?

问题BackGroud:



最近,我开发了一个.Net加载项应用程序,这个加载项在VS2010启动后加载到VS2010中。



当我用VS2010打开一个C ++项目时,我需要调试这个C ++项目。但是,这个c ++项目将调用一个Unmanaged C ++ dll文件。我想实现使用加载项监视C ++ DLL的变量值。也就是说,当变量值发生变化时,加载项将监视此更改并响应更改。我想用事件机制来实现这个功能,但我真的遇到了麻烦。请给我一些关于这个问题的建议。谢谢!

Question BackGroud:

Recently, I develop a .Net Add-Ins application, this add-ins is loaded into VS2010 after VS2010 start.

when I open a C++ project with VS2010, i need to debug this C++ project. however, this c++ project will call a Unmanaged C++ dll file. I want to implement to monitor a variable values of the C++ dll using Add-Ins. that is to say, when the variable values change, the Add-Ins will monitor this change and respond changes. I want to implement this function with Events machanism, but I really meet trouble in this matter. pls give me some advices about this question. thanks!



 1 条回答