Can a Windows Service Return any value

I am new to dotnet, but for our requirement we need Windows Service returns value.

If possible send the details and example in C#.



Answer this question

Can a Windows Service Return any value

  • Steve at Pixelda

    You should use some method of Inter Process Communication between your client application and the windows service.
    .....following some IPC methods:
    -MSMQ
    -Named pipes
    -Sockets
    -File mapping
    -Even simple files may be an option sometimes
    -Registry
    -Memory mapped files
    -Database
    -Windows messages
    -Remoting(as Micky said in his post)

    You may consider using xml web service instead of windows service of course. In this case the communication implementation effort is minimal(assuming you are using Visual Studio)


  • Jeff Lebowski

    Windows Services do not 'return values' in the normal sense to a client application. However you could have that service pubish a remoting object for example whose method returns a value.

    Cheers,
    Micky


  • Can a Windows Service Return any value