pass unmanaged C++ method to C# dll for callback
问题 I have a .Net dll which I have registered and am able to call methods on from my C# code. I essentially followed this tutorial: http://support.microsoft.com/kb/828736 now I need to do something in c# asynchronously, so I need some way of telling the c++ code that I am done. I have created a method like so: public void Init(string server, IntPtr callback); which I can see in the c++ as: Init(BSTR server, long callback); I also need to pass a variable back to the c++ code when I make invoke it.