thx nick!
I read it and did some code but now i get this error: "An unhandled
exception of type 'System.OverflowException' occurred in mscorlib.dll
Additional information: Arithmetic operation resulted in an overflow."
i'm using a delegate with matching signature of remote method. here is
following code:
MyRemoteCom.Class MyCom= new MyRemoteCom.Class();
MyDelegate caller = new MyDelegate(MyCom.MyMethod);
IAsyncResult result = caller.BeginInvoke(null, null);
Thread.Sleep(2000);
label1.Text=caller.EndInvoke(result);
this looks pretty straightforward but somehow the "endinvoke" part
throws forementioned error. The remote method is simple string
returning method with no other code. If i use sync call like:
label1.text=MyCom.MyMethod() works just fine
what could be the problem here?
thanks
Nicholas Paldino [.NET/C# MVP] wrote:
6954,
Take a look at the IAsyncResult interface. There should be
documentation there on how you would get a result from the async call when
you are done.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"6954" <ma*********@gmail.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
Nicholas
if i use delegates, can i get specific data back to the calling thread
(like with sinchronous calls), or do i just get something like "method
executed correctly" information? and could you perhaps point me to some
more documentation on that subject (delegates and iasync) if its not
too much of a problem
thanks
Nicholas Paldino [.NET/C# MVP] wrote:
Are you trying to use the asynchronous ability that COM+ proxies expose,
or do you just want to make an asynchronous call in general? If the
answer
is the latter, why not just run the call on another thread? Or better
yet,
create a delegate with the same signature and then make the call to your
proxy, using the IAsyncResult returned from the async call on the
delegate.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"6954" <ma*********@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi!
i need to implement some asynchronous call to my com+ component, but i
need it to return some values (e.g. results of sql select statement).
obviously queued components and MSMQ are out of the question...
anyone has any ideas how to implement it? or just a guideline maybe?
thank you