473,395 Members | 1,348 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Referencing question...

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.
Apr 25 '07 #1
1 968
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.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Joe" <Jo*@discussions.microsoft.comwrote in message
news:59**********************************@microsof t.com...
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.

Apr 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Adam Hartshorne | last post by:
Hi All, I have this stange compiler error. I have a class B that includes pointers to class A, therefore I have done forward referencing by doing class A; at the start of the header file. Ok...
6
by: jstaggs39 | last post by:
I want to create a Dcount and an If...Then...Else statement to count the number of records in a table based on the date that is entered to run the form. The If....Else statment comes in because if...
12
by: Mark Broadbent | last post by:
Hi guys, just going through remoting at the moment and a couple of questions relating to .net in general has surfaced. Firstly I have seen in the designer that for the namespace and many of its...
13
by: Dan Bass | last post by:
Say I've got an ArrayList, which contains a list of integers. Is it possible to get a reference to one of the integers contained within the collection so that changes to it are reflected in the...
2
by: Chang | last post by:
Actually I am not sure how to word this question, I will try my best. Remove all the HTML code from a give *.html file and show it as text file. I am using WebBrowser to open (local) html...
3
by: gary | last post by:
Hi, I am trying to reference an anchor in a user control with a url. This worked in 1.1 but no longer works in 2.0. The ascx control is located in a "/include" folder If you have a...
0
by: Demetri | last post by:
I have a performance question with regards to packaging assemblies and referencing them. First lets say you have created the following assemblies: Company.Framework.dll...
2
by: Axel | last post by:
Hi, a question about something that seems very simple at first glance: is it possible to reference other controls of a subform in a query window without referencing through the parent form? I...
1
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
21
by: cmd | last post by:
I have code in the OnExit event of a control on a subform. The code works properly in this instance. If, however, I put the same code in the OnExit event of a control on a Tab Control of a main...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.