I am using .net remoting, with asynchronous function calls, to handle the ipc of my current project.
I had a problem when I would like a client:
- Request information asynchronously
- Continue loading GUI
- When the ASynchronous call is complete, load it into gui
I am doing this with the following code
GetFileTextDelegate ^svd = gcnew GetFileTextDelegate(obj, &BaseRemoteObject::GetFileText);
AsyncCallback ^callback = gcnew AsyncCallback(RecievedSomething);
IAsyncResult ^arValSet = svd->BeginInvoke(callback, nullptr);
In the above example, RecievedSomething MUST be the static method in this example. Why is this? If I could make this function non-static, I could load my gui, and all is well.
My solution is to get Received. Something triggered the static event that my gui signs. This is cumbersome as it now requires 2 delegates and an event to handle my 1st asynchronous function call.
Is there a way to speed up AsyncCallback with a non-static function?
Thank!
source
share