static TalkAPI() { ReceivedMessageCallback = new IMReceiveMessageCallback(OnReceiveIMMessage); MessageArcCallback = new IMMessageArcCallback(OnReceiveMessageAck); UploadFileProgressChanged = new UploadFileCallback(OnUploadFileProgressChanged); TalkNativeMethods.nim_talk_reg_ack_cb("", MessageArcCallback, IntPtr.Zero); TalkNativeMethods.nim_talk_reg_receive_cb("", ReceivedMessageCallback, IntPtr.Zero); }
internal static void RegisterCallbacks() { _receivedMessageCallback = new IMReceiveMessageCallback(OnReceiveIMMessage); _messageArcCallback = new IMMessageArcCallback(OnReceiveMessageAck); _uploadFileProgressChanged = new UploadFileCallback(OnUploadFileProgressChanged); TalkNativeMethods.nim_talk_reg_ack_cb("", _messageArcCallback, IntPtr.Zero); TalkNativeMethods.nim_talk_reg_receive_cb("", _receivedMessageCallback, IntPtr.Zero); }