Referencing question...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to figure out the best way to do this.

I have a Windows Service with a namespace called WSSynch that currently
has a variable (iTimeDelay) that holds the current time delay for when the
next synchronization takes place.

I want to add an app that will run that will allow me to change the settings.
So I created a new Windows Application with a namespace of WASynch
and set it as the default project. So I can now control the service from this
app.

How can I reference the variable iTimeDelay in the WSSynch namespace?
Or is this not the best way to do this?

Any pointers would be greatly appreciated.
 
Joe,

You can't. You need a way of getting into the app domain of the service
and then setting the value there. The best way of doing this would be to
use some sort of cross-app-domain mechanism to send the information to the
service, which the service will then use to set the value in its app domain.

Personally, I recommend using WCF if you are using .NET 3.0. If you are
using .NET 2.0 or earlier, then remoting would be the way to go.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top