I have two Backgroundplugins running one on event sever and one on SmartClient.
I do the communication from server plugin to SC plugin via MessageCommunicationManager. This works fine. In SC plugin I use “_msgCommunication.RegisterCommunicationFilter(new MessageReceiver(ChangedAlarmMessageHandler), new CommunicationIdFilter(MessageID_FireDetectionClientComm));”. In the “ChangedAlarmMessageHandler” I unpack all information I need and call a function for removing a camera from a floating window. Here I use the function “_viewAndLayoutItem.InsertBuiltinViewItem(item.Index, ViewAndLayoutItem.CameraBuiltinId, properties);” and if I call this function I get a threading error. Calling this function from this event “_manager.RegisterReceiver(new MessageReceiver(NewAlarmMessageHandler), new MessageIdFilter(MessageId.Server.NewAlarmIndication));” works without problems.
I found nothing to invoke this in a background plugin.
What can I do to solve this problem?