Hi all,

I'm developping a application and I need to use the system assynchronous services in order so send my application events to the same queue of the key events. in way to have a single entry point for all events.

I'm using the following code :

TWsEvent event;

// Set event data. eventType.data = KData;

event.SetTimeNow(); // set the event time
event.SetType(EEventUser + MyEvent); // set event type

event.SetHandle(iWsSession.WsHandle()); // set window server handle

*((EventMsg*)event.EventData()) = EventMsg((TAppEvent) aEvent, aParam);

// Send the created event

int err = iWsSession.SendEventToAllWindowGroups(event);

Then I handle my event into HandleApplicationSpecificEventL,

However I have some threads that also send events, the problem is that sometimes I lost an event, in other words, SendEventToAllWindowGroups send with no error but the event never arrive at HandleApplicationSpecificEventL.

I read that the queue as a finite size, and I'm sending a event for each 100 ms. In the book says that the queue can refuse some events but never happened so far.

I'm doing something wrong, or this is not the best approach to do what I'm doing ??