Groups | Blog | Home
all groups > dotnet remoting > august 2006 >

dotnet remoting : Is it possible to use a Form method as callback method?


Kürþat
8/29/2006 12:00:00 AM
Hi all,

I know that callback methods should be members of MarshalByRefObject
derivative classes. A windows Form already derives from Form class and
multiple inheritance is not accepted. So a form can not derives from
MarshalByRefObject. Well, but how does a remote object call back a form
method?

Thanks in advance.

Mehdi
8/29/2006 3:42:30 PM
[quoted text, click to view]

It doesn't. What you'd usually do is create a small proxy class that
inherits from MarshalByRefObject and receive the events from the server.
Spam Catcher
8/31/2006 1:38:36 PM
"Kürþat" <kursattheking@hotmail.com> wrote in news:uIsx#azyGHA.2208
@TK2MSFTNGP03.phx.gbl:

[quoted text, click to view]

Pass a reference of the form to the server.

On the server, store the reference - then push events back to the client.

That's the most reliable way to do callbacks in remoting.

www.codeproject.com/csharp/RemotingAndEvents.asp

AddThis Social Bookmark Button