static void Main(string[] args) { // initialize the delegate instance variable m_myCB = new myCB_delegate(Program.concreteCallback); // set it in the DLL for proper call backs.. ManagedCallbacks.setCallback(m_myCB); // demonstrate that it works. for (int x = 0; x < 30; x++) { ManagedCallbacks.AddTwo(x); } }
public static extern void setCallback(myCB_delegate cb);