// private bool _callbacksInstalled = false; private void setCallbacks() { _receiveDelegate = new ReceiverDelegate(receiveOutput); _joinDelegate = new SubscriberDelegate(sessionSubscriber); _queryDelegate = new IncomingQueryDelegate(incomingQuery); _xferDelegate = new IncomingXferDelegate(xferHandler); GC.KeepAlive(_queryDelegate); GC.KeepAlive(_xferDelegate); GC.KeepAlive(_receiveDelegate); GC.KeepAlive(_joinDelegate); }
private static extern void SetIncomingXferInterface( [MarshalAs(UnmanagedType.FunctionPtr)] IncomingQueryDelegate qcb, [MarshalAs(UnmanagedType.FunctionPtr)] IncomingXferDelegate xcb);
// XferObject public void SetLocalIncomingXferInterface(IncomingQueryDelegate qcb, IncomingXferDelegate xcb) { SetIncomingXferInterface(qcb, xcb); }