Sending event through RWsSession

Login to reply to this topic.
Tue, 2007-07-10 15:21
Joined: 2007-07-10
Forum posts: 1

Hi,

I'm developing and application which requires send asynchronous events. The purpose is always use the system to pass events to my application with the purpose of having only one entry point, for example, for keys, and for my events, use the same system queue.

I read that i can send events to the WSERV using SendEventToAllWindowGroups (), and I'm using this don't know if it's the best approach, but as I can send a type = EEventUser + MyEventId , the WSERV is sending me the event correctly.

I found a little problem, because I'm using threads, and some of the events from one thread should wake up another thread, but if I press a key down for a few seconds, the event sent by my thread using SendEventToAllWindowGroups gets lost.

The WSERV don't send it back to me. I don't know if I'm doing something wrong the code I'm using is this

To send:

TWsEvent event;
event.SetTimeNow();
event.SetType(EEventUser + aEvent);

RWsSession session;

session.Connect();

event.SetHandle(session.WsHandle());

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

int err = session.SendEventToAllWindowGroups(event);

session.Close();

To Receive I handle the event at HandleWsEventL ()..

Any help will be important, thanks

BR,

Victor


Wed, 2007-07-11 07:44
Joined: 2006-05-10
Forum posts: 64
Re: Sending event through RWsSession

Hi,

How do you capture a long key press? Are you sure, that you're actually sending the event?

Regards,
Damian


Confusion will be my epitaph..

  • Login to reply to this topic.