mynkow mynkow - 1 year ago 94
C# Question

How to get activated addins?

I have several addins activated within a windows service process. I have another process where a GUI application is running. What I want is to get somehow the activated addins form the service. The problem is that I cannot get the activated addins event within the service process. Any ideas?

PS: I am talking about System.Addin


What I really want is to shutdown addins. One way to do it is like the code bellow. The problem is that I need a reference to the addin. The GUI application does not have a such reference. Should I serialize in the service and deserialize in the GUI?

// Retreive the AddInController for my add-in and then shut it down

Answer Source

This is actually an interprocess communication problem. Although your service can keep a list of add-ins as it activates them, there's no way another application can see that list unless the service explicitly exposes it. Which means that the problem is no different than exposing any list of objects.

You can do this in many ways, such as exposing a WCF service, or a shared database, or a memory-mapped file.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download