Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Failed to post event by kdPostWindowEventQNX: (3 Items)
   
Failed to post event by kdPostWindowEventQNX  
Hi, everyone!
I want to post an event from a thread to the window(or thread) that created by kdCreateWindow.The environmoment of 
platform is QNX 6.4.0 and HP(x86)PC. The process is: 
1.EGL get display (ok)
2.EGL initialize(ok)
3.choose config by EGL(ok)
4.kdCreateWindow(ok)
5.kdRealizeWindow(ok)
6.kdThreadCreate(ok)
 6.1 kdCreateEvent(ok)
 6.2 set event data(0k)
 6.3 kdPostWindowEventQNX(NG)
7.kdWaitEvent(event nothing)
※6.1 6.2and 6.3 is sub thread process

6.3error id is 31(KD_EOPNOTSUPP)operation not supported.

My question:
1.How to clear the error?
2.There is another method to post a event from thread to window(or thread)?

Re: Failed to post event by kdPostWindowEventQNX  
kdPostWindowEventQNX will return KD_EOPNOTSUPP if the event type is not one of KD_EVENT_WINDOW_CLOSE, 
KD_EVENT_WINDOW_REDRAW, KD_EVENT_WINDOW_FOCUS, KD_EVENT_WINDOWPROPERTY_CHANGE, KD_EVENT_STATE, KD_EVENT_INPUT, 
KD_EVENT_INPUT_JOG, KD_EVENT_INPUT_POINTER, KD_EVENT_INPUT_STICK, KD_EVENT_USER, KD_QNX_EVENT_KEYBOARD, 
KD_QNX_EVENT_WINDOW_CREATE, KD_QNX_EVENT_WINDOW_REALIZE, KD_QNX_EVENT_WINDOW_PROPERTY, or KD_QNX_EVENT_WINDOW_CLOSE.

To answer your specific questions, the error code returned by kdGetError is not changed unless kdSetError is called or 
another OpenKODE function sets the value as specified for that function.

kdPostThreadEvent would normally be used to post events from one thread to another. However, this function isn't 
implemented in QNX yet, so your best be is to stick with kdPostWindowEventQNX for now.
Re: Failed to post event by kdPostWindowEventQNX  
Thank you very much !
I have soult out the question with your help!