473,395 Members | 2,689 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.

Windows Services & .NET Controls

Hi,
I'm currently stuck with a big problem. I must develop a Windows service
and an application to configure it and display what is happening. The
problem is not really on the service side, but on the application side. I
explain:

The service is composed of a kernel dynamicaly loading plug-ins modules and
starts the process of each module. Until nous, it's not that hard.

The hard part is when it comes to the application to configure the service
and display what is happening. Each module has it's own configuration panel
and it's own display panel. I'm not that familiar with which information I
can pass from my service to my application, so I need to know if there is a
way I can pass an instance of a control from my service to my application
and how can I do it? I've been searching all over the net to find it, but it
seems nobody ever did it (or they didn't put the solution on the net)

And I would have something else. In fact I would like to have the opinion of
someone else on that. My software is designed that way :

Module1 ---- ---- Module2
\ /
Module3 ----Kernel ---- Module4
/ \
Module5 ---- ---- Module6

Service ----Using----- Kernel

Application ----Communicating With ---- Service

Application ----Displays---- ModuleX.ConfigurationPanel or
ModuleX.ActionPanel that came from the Service

First of all, would anyone see a better design involving a service for
displaying the information? if you do, what is it and why(if possible)?

thanks

ThunderMusic

P.S. Sorry for the other post, I just did not verify the subject before
sending... ;)

Nov 21 '05 #1
10 1015
you can use the remoting solution.

[]'s
Sushi
Nov 21 '05 #2
But you'd have to implement ISerializable on the controls...

"Sushi" <su********@terra.com.br> wrote in message
news:Oo**************@TK2MSFTNGP12.phx.gbl...
you can use the remoting solution.

[]'s
Sushi

Nov 21 '05 #3
ok, do you have an example of this? is it available on MSDN?

Thanks a lot, it gives me a hint for where to begin... ;)

"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
But you'd have to implement ISerializable on the controls...

"Sushi" <su********@terra.com.br> wrote in message
news:Oo**************@TK2MSFTNGP12.phx.gbl...
you can use the remoting solution.

[]'s
Sushi


Nov 21 '05 #4
ok, after checking on MSDN, I found something about MarshalByReference and I
think it could be useful, but there are no example of how it can be used
(well, I didn't find one). So I cannot say if this is the thing I need. Does
someone know about an example?

thanks

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> a écrit dans le message de
news:ua**************@TK2MSFTNGP09.phx.gbl...
ok, do you have an example of this? is it available on MSDN?

Thanks a lot, it gives me a hint for where to begin... ;)

"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
But you'd have to implement ISerializable on the controls...

"Sushi" <su********@terra.com.br> wrote in message
news:Oo**************@TK2MSFTNGP12.phx.gbl...
you can use the remoting solution.

[]'s
Sushi



Nov 21 '05 #5
You can't use MarhalByRef in your example. The root of the object
inheritance chain would have to be MarshalByRef, and Control is not. That's
why you' have to implement ISerializable, in order to control the
serialization process.

Have a look at:
http://samples.gotdotnet.com/quickst...ializable.aspx
for an example

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
ok, after checking on MSDN, I found something about MarshalByReference and
I
think it could be useful, but there are no example of how it can be used
(well, I didn't find one). So I cannot say if this is the thing I need.
Does
someone know about an example?

thanks

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> a écrit dans le message
de
news:ua**************@TK2MSFTNGP09.phx.gbl...
ok, do you have an example of this? is it available on MSDN?

Thanks a lot, it gives me a hint for where to begin... ;)

"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
> But you'd have to implement ISerializable on the controls...
>
> "Sushi" <su********@terra.com.br> wrote in message
> news:Oo**************@TK2MSFTNGP12.phx.gbl...
> > you can use the remoting solution.
> >
> > []'s
> > Sushi
> >
> >
>
>



Nov 21 '05 #6
ok, but the controls I use are always controls à created, so can I make them
inherit from MarshalByRefObject? and then use them that way?

thanks a lot
"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
You can't use MarhalByRef in your example. The root of the object
inheritance chain would have to be MarshalByRef, and Control is not. That's why you' have to implement ISerializable, in order to control the
serialization process.

Have a look at:
http://samples.gotdotnet.com/quickst...ializable.aspx
for an example

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
ok, after checking on MSDN, I found something about MarshalByReference and I
think it could be useful, but there are no example of how it can be used
(well, I didn't find one). So I cannot say if this is the thing I need.
Does
someone know about an example?

thanks

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> a écrit dans le message
de
news:ua**************@TK2MSFTNGP09.phx.gbl...
ok, do you have an example of this? is it available on MSDN?

Thanks a lot, it gives me a hint for where to begin... ;)

"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
> But you'd have to implement ISerializable on the controls...
>
> "Sushi" <su********@terra.com.br> wrote in message
> news:Oo**************@TK2MSFTNGP12.phx.gbl...
> > you can use the remoting solution.
> >
> > []'s
> > Sushi
> >
> >
>
>



Nov 21 '05 #7
Will this serialisation allow me to pass the control from my service to the
application or will I need to create an instance of the control in my app
and get the informations to display what I need to display from the service?
I mean, to get a reference to the existing control from the service would be
much more efficient, if it can be done.

I don't understand much about the serialisation in this case and/or
MarshalByRefObject. I don't know the differences and if one or the other can
be used considering all the controls used will be made by me, so they can
inherit from both (or can't they?)

"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
You can't use MarhalByRef in your example. The root of the object
inheritance chain would have to be MarshalByRef, and Control is not. That's why you' have to implement ISerializable, in order to control the
serialization process.

Have a look at:
http://samples.gotdotnet.com/quickst...ializable.aspx
for an example

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
ok, after checking on MSDN, I found something about MarshalByReference and I
think it could be useful, but there are no example of how it can be used
(well, I didn't find one). So I cannot say if this is the thing I need.
Does
someone know about an example?

thanks

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> a écrit dans le message
de
news:ua**************@TK2MSFTNGP09.phx.gbl...
ok, do you have an example of this? is it available on MSDN?

Thanks a lot, it gives me a hint for where to begin... ;)

"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
> But you'd have to implement ISerializable on the controls...
>
> "Sushi" <su********@terra.com.br> wrote in message
> news:Oo**************@TK2MSFTNGP12.phx.gbl...
> > you can use the remoting solution.
> >
> > []'s
> > Sushi
> >
> >
>
>



Nov 21 '05 #8
No you can't. The base Control class itself is not a MarshalByRef object. If
you inherit from MarshalByRefObject then your class is not a control. If you
inherit from Control (or any of it's child classes) you're root object is
Object not MarshalByRefObject.

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:uy*************@TK2MSFTNGP12.phx.gbl...
ok, but the controls I use are always controls à created, so can I make
them
inherit from MarshalByRefObject? and then use them that way?

thanks a lot
"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
You can't use MarhalByRef in your example. The root of the object
inheritance chain would have to be MarshalByRef, and Control is not.

That's
why you' have to implement ISerializable, in order to control the
serialization process.

Have a look at:
http://samples.gotdotnet.com/quickst...ializable.aspx
for an example

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> ok, after checking on MSDN, I found something about MarshalByReference and > I
> think it could be useful, but there are no example of how it can be
> used
> (well, I didn't find one). So I cannot say if this is the thing I need.
> Does
> someone know about an example?
>
> thanks
>
> "ThunderMusic" <NO*******@sympatico.caSPAMATALL> a écrit dans le
> message
> de
> news:ua**************@TK2MSFTNGP09.phx.gbl...
>> ok, do you have an example of this? is it available on MSDN?
>>
>> Thanks a lot, it gives me a hint for where to begin... ;)
>>
>> "Sean Hederman" <us***@blogentry.com> a écrit dans le message de
>> news:cv**********@ctb-nnrp2.saix.net...
>> > But you'd have to implement ISerializable on the controls...
>> >
>> > "Sushi" <su********@terra.com.br> wrote in message
>> > news:Oo**************@TK2MSFTNGP12.phx.gbl...
>> > > you can use the remoting solution.
>> > >
>> > > []'s
>> > > Sushi
>> > >
>> > >
>> >
>> >
>>
>>
>
>



Nov 21 '05 #9
thanks a lot... now it's clear... ;)

"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
No you can't. The base Control class itself is not a MarshalByRef object. If you inherit from MarshalByRefObject then your class is not a control. If you inherit from Control (or any of it's child classes) you're root object is
Object not MarshalByRefObject.

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:uy*************@TK2MSFTNGP12.phx.gbl...
ok, but the controls I use are always controls à created, so can I make
them
inherit from MarshalByRefObject? and then use them that way?

thanks a lot
"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
You can't use MarhalByRef in your example. The root of the object
inheritance chain would have to be MarshalByRef, and Control is not.

That's
why you' have to implement ISerializable, in order to control the
serialization process.

Have a look at:
http://samples.gotdotnet.com/quickst...ializable.aspx
for an example

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> ok, after checking on MSDN, I found something about MarshalByReference
and
> I
> think it could be useful, but there are no example of how it can be
> used
> (well, I didn't find one). So I cannot say if this is the thing I

need. > Does
> someone know about an example?
>
> thanks
>
> "ThunderMusic" <NO*******@sympatico.caSPAMATALL> a écrit dans le
> message
> de
> news:ua**************@TK2MSFTNGP09.phx.gbl...
>> ok, do you have an example of this? is it available on MSDN?
>>
>> Thanks a lot, it gives me a hint for where to begin... ;)
>>
>> "Sean Hederman" <us***@blogentry.com> a écrit dans le message de
>> news:cv**********@ctb-nnrp2.saix.net...
>> > But you'd have to implement ISerializable on the controls...
>> >
>> > "Sushi" <su********@terra.com.br> wrote in message
>> > news:Oo**************@TK2MSFTNGP12.phx.gbl...
>> > > you can use the remoting solution.
>> > >
>> > > []'s
>> > > Sushi
>> > >
>> > >
>> >
>> >
>>
>>
>
>



Nov 21 '05 #10
thanks a lot... now it's clear... ;)

"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
No you can't. The base Control class itself is not a MarshalByRef object. If you inherit from MarshalByRefObject then your class is not a control. If you inherit from Control (or any of it's child classes) you're root object is
Object not MarshalByRefObject.

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:uy*************@TK2MSFTNGP12.phx.gbl...
ok, but the controls I use are always controls à created, so can I make
them
inherit from MarshalByRefObject? and then use them that way?

thanks a lot
"Sean Hederman" <us***@blogentry.com> a écrit dans le message de
news:cv**********@ctb-nnrp2.saix.net...
You can't use MarhalByRef in your example. The root of the object
inheritance chain would have to be MarshalByRef, and Control is not.

That's
why you' have to implement ISerializable, in order to control the
serialization process.

Have a look at:
http://samples.gotdotnet.com/quickst...ializable.aspx
for an example

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
> ok, after checking on MSDN, I found something about MarshalByReference
and
> I
> think it could be useful, but there are no example of how it can be
> used
> (well, I didn't find one). So I cannot say if this is the thing I

need. > Does
> someone know about an example?
>
> thanks
>
> "ThunderMusic" <NO*******@sympatico.caSPAMATALL> a écrit dans le
> message
> de
> news:ua**************@TK2MSFTNGP09.phx.gbl...
>> ok, do you have an example of this? is it available on MSDN?
>>
>> Thanks a lot, it gives me a hint for where to begin... ;)
>>
>> "Sean Hederman" <us***@blogentry.com> a écrit dans le message de
>> news:cv**********@ctb-nnrp2.saix.net...
>> > But you'd have to implement ISerializable on the controls...
>> >
>> > "Sushi" <su********@terra.com.br> wrote in message
>> > news:Oo**************@TK2MSFTNGP12.phx.gbl...
>> > > you can use the remoting solution.
>> > >
>> > > []'s
>> > > Sushi
>> > >
>> > >
>> >
>> >
>>
>>
>
>



Nov 21 '05 #11

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

Similar topics

11
by: ThunderMusic | last post by:
Hi, I'm currently stuck with a big problem. I must develop a Windows service and an application to configure it and display what is happening. The problem is not really on the service side, but on...
8
by: Bf | last post by:
I was creating test projects using c# and was surprised that there seems to be only a form based windows applications available. Is it safe to assume that classic window applications that utilize a...
18
by: jayderk | last post by:
a customer was trying to install some of our software after they installed the windows XP service pack 2 and he is getting a message that says something about it not being compatable with windows...
22
by: Jordan S. | last post by:
SQL Server will be used as the back-end database to a non trivial client application. In question is the choice of client application: I need to be able to speak intelligently about when one...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
3
by: Mika M | last post by:
I'm programming quite simple Windows Service using C# 2005. I also made setup for it into same solution. When I run setup to install service, it's going fine into C:\Program Files\MyCompany\My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.