Write an asynchronous method
| Wed, 2005-08-24 16:43 | |
|
Hello,
I would like to know how to write an asynchronous method. In fact IÂ’m using a CActive Object with a method that check all entries of the CContactDatabase and I would like to set it as asynchronous method so that it can continue the operations without waiting for its end. This is my method : void CMyCActive::SearchContactAsyn( const TDesC & aNumber, TRequestStatus& aStatus ) { SetActive(); //My code that search a contact ..... } The problem is that it doesnÂ’t run asynchronously and the whole application is waiting after it. If anyone knows please let me know. Thank you very much, Bernie |
|






Forum posts: 121
In your search function call your own runl
TRequestStatus* ptr = &iStatus;
iStatus = KRequestPending;
SetActive();
User::RequestComplete(ptr, KErrNone);
Don't forget to store the clients aStatus value, and when your finished you inform the client that the search is over with
User::RequestComplete(iClientStatus, KErrNone);