locked
How to access another assembly using Reflection RRS feed

  • Question

  • I have a .NET Windows Service that has a public collection object in one of its class.  This collection object constantly keeps updated with different values while the service runs.  Then I have another .NET WPF application that needs to access that public collection object and display its values in a simple UI.  Basically, I need to access that public collection object while the Windows Service is running to display its changing values.

    I guess I need to use .NET Assembly class to somehow load the running assembly (Windows Service) in my WPF application.  But I am not sure which specific method(s) I need to use to do this.  Any sample code will be greatly appreciated. 

    Thanks in advance,

    Vijay Jain

     

    Wednesday, May 5, 2010 7:13 PM

Answers

  • Hi Vijay,

    From my understanding, you want to make a Windows application interacts with a Windows service, am I right?

    As far as I know, Reflection cannot help on this issue, instead, we may use some inter-process communication technology (RPC), for example: File Mapping, Named Pipe, Remoting or Socket, you can find those RPC related samples from 'All-In-OneIPC and RPC' Samples solution of All-In-One Code Framework.

     

    You may also host a WCF service in a Windows service, and consume the service from Windows applications, this article shows more details.


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by eryang Friday, May 21, 2010 7:30 AM
    Thursday, May 6, 2010 1:44 AM