HighTechTalks DotNet Forums  

How to access an applications form through remoting

Dotnet Framework (Remoting) microsoft.public.dotnet.framework.remoting


Discuss How to access an applications form through remoting in the Dotnet Framework (Remoting) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
ZacharyDallas
 
Posts: n/a

Default How to access an applications form through remoting - 11-12-2007 , 02:44 PM






I want to be able to use .Net Remoting in order for a client to call a
remote object on a server, and then have the server update a control
in a form based on that call. From what I can tell, when an object
runs on the server it does not know anything about the application
that it is running inside of and the application knows nothing about
it. This means that the remote object could not access any controls
or data inside the application and the application could not access
any member variable or functions inside the object. Is there a way to
get around this?

Thanks
Zachary


Reply With Quote
  #2  
Old   
Spam Catcher
 
Posts: n/a

Default Re: How to access an applications form through remoting - 11-13-2007 , 12:06 AM






ZacharyDallas <zacharydallas (AT) yahoo (DOT) com> wrote in
news:1194900257.801019.67060 (AT) o38g2000hse (DOT) googlegroups.com:

Quote:
I want to be able to use .Net Remoting in order for a client to call a
remote object on a server, and then have the server update a control
in a form based on that call. From what I can tell, when an object
runs on the server it does not know anything about the application
that it is running inside of and the application knows nothing about
it. This means that the remote object could not access any controls
or data inside the application and the application could not access
any member variable or functions inside the object. Is there a way to
get around this?
Yes, get your form to host a singleton object.

The singleton object can either broadcast events or have a direct reference
to the parent form and call functions on the form.

If you're starting a new project, take a look at WCF - much more flexible
than remoting.


Reply With Quote
  #3  
Old   
ZacharyDallas
 
Posts: n/a

Default Re: How to access an applications form through remoting - 11-13-2007 , 11:40 AM



On Nov 13, 12:06 am, Spam Catcher <spamhoney... (AT) rogers (DOT) com> wrote:
Quote:
ZacharyDallas <zacharydal... (AT) yahoo (DOT) com> wrote innews:1194900257.801019.67060 (AT) o38g2000hse (DOT) googlegroups.com:

I want to be able to use .Net Remoting in order for a client to call a
remote object on a server, and then have the server update a control
in a form based on that call. From what I can tell, when an object
runs on the server it does not know anything about the application
that it is running inside of and the application knows nothing about
it. This means that the remote object could not access any controls
or data inside the application and the application could not access
any member variable or functions inside the object. Is there a way to
get around this?

Yes, get your form to host a singleton object.

The singleton object can either broadcast events or have a direct reference
to the parent form and call functions on the form.

If you're starting a new project, take a look at WCF - much more flexible
than remoting.
I may or may not be able to use .NET 3.0 and WCF. Meanwhile, in the
reading I've done I've seen references to singleton objects but not
much information or examples on how to use them in remoting. Does the
form know the address of the singleton object? In the examples I have
seen it registers it but does not know its address.

How does the singleton go about calling into the form? How does it
get the address of the form it is being hosted in? And, how does it
know the functions available in the form?

Thanks



Reply With Quote
  #4  
Old   
Spam Catcher
 
Posts: n/a

Default Re: How to access an applications form through remoting - 11-23-2007 , 03:21 PM



ZacharyDallas <zacharydallas (AT) yahoo (DOT) com> wrote in
news:1194975604.158129.169580 (AT) v65g2000hsc (DOT) googlegroups.com:

Quote:
I may or may not be able to use .NET 3.0 and WCF. Meanwhile, in the
reading I've done I've seen references to singleton objects but not
much information or examples on how to use them in remoting. Does the
form know the address of the singleton object? In the examples I have
seen it registers it but does not know its address.

How does the singleton go about calling into the form? How does it
get the address of the form it is being hosted in? And, how does it
know the functions available in the form?
Take a look at the MarshalByRef function:

http://msdn2.microsoft.com/EN-US/lib...halbyrefobject
(VS.71).aspx

--


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.