[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Calling a WebService Async and providing a callback delegate - Problem

Paul C

7/18/2002 4:10:00 PM

Hi All,

I am having difficulty with some asyncronous calls.
Scenario :
I have a webservice with 2 webmethods.
srting MethodA()
int MethodB()
I then have 2 delegates in my app ,
MyEventHandler1 d_WSa = new MyEventHandler1(objWS.MethodA);
MyEventHandler2 d_WSb = new MyEventHandler2(objWS.MethodB);
I then call the webmethodA,
aResult = d_WSa.BeginInvoke(null, null);
this is where the problem is .. I want to call the method and provice a
callback delgate like so,
aResult = d_WSa.BeginInvoke(DelegateToMyEvent, null);
Where DelegateToMyEvent calls another function.
However the second call wont compile. Any ideas why?
I dont get the point of maving to Poll the IAsyncResult to see if the result
has been returned, rather let it fire an event in the code when it has
finished.

If anyone can help it would be greatly appreciated.
Thanx
Paul
PaulC@microgaming.com