Hi Nicholas,
Thanks for responding. See below...
--
Grant Schenck
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:eb**************@TK2MSFTNGP03.phx.gbl...
Grant,
There are a few things here that don't make sense. See inline:
>I'm just starting with .NET remoting. Here is what I'm not sure how to
handle.
I have a IPC Channel remoting server. It exports an object and I can
call a method on that object just fine. I'd like to kick off some
activity and block until the activity completes.
If you just make a regular call across a remoting channel, the call
blocks until the method is complete. Your code doesn't continue to
execute while the proxy on the client side is waiting for the call on the
server to complete.
[GRANT] Correct, the client blocks until I eventually complete.
>The completion arrives as a COM call back on a thread from the COM object
so really my question is:
That doesn't make sense. What is a "COM call back" (I'm thinking
connection points here, but that makes no sense in this context). Are you
exporting an unmanaged COM object as a remoting endpoint? If so, that's
probably a bad, bad idea.
How is COM involved in this?
[GRANT] I use an unmanged COM object which provides call backs to the
service. This part works fine. The connection to remoting is that the
request which comes in via remoting to the server does some setup and then
needs to block until an asyncronous event arrives at the COM object.
What I want to do in the remoted method in the server is:
- Setup some stuff.
- Create some kind of signalling object
- Block waiting for the object to signal.
The other thread (the fact that it is COM is really not relevent) at some
point completes the work intiiated by the setup and then needs to signal the
blocked method to release it and allow it to complete and therefore the
client to returned to. It may take up to a minute before the request
completes.
Basicly I'm building a command line utility which talks to a server via an
IPC channel. This server uses the services of a COM object to place a call
but I don't want to complete the method until the call connects or I want to
give up watiing for the call to connect. Therefore, I need a way to release
the waiting method from a separate thread which handles events generated by
the COM object.
>
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
>>
What is a straight forward .NET way to have the .NET remote call block on
something and then be released?
Thanks!
--
Grant Schenck