U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Class method called by keyboard hook callback has an empty "this" pointer
Re: Class method called by keyboard hook callback has an empty "this" pointer [message #37335 is a reply to message #37334] Sun, 23 September 2012 12:51 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Mirko,

Welcome to the forum Cool

Mircode wrote on Sun, 23 September 2012 11:31

Inside the LowLevelKeyboardProc function, I call

MainWindow->ProcessKbdEvent(...)


but inside the ProcessKbdEvent method, "this" does not point to MainWindow. Instead, it is a nullpointer.


This would most probably happen if MainWindow==null at the time of calling MainWindow->ProcessKbdEvent(). You can add a check for this in LowLevelKeyboardProc to confirm this. I don't know how your code is structured, but I believe that the function is called before any instance of KeyBuddy2 is created or something like that.

Best regards,
Honza

[Updated on: Sun, 23 September 2012 12:52]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [bug report] EditField::StdBar Undo menu not checked and EditField::RightDown is reentrant
Next Topic: ZMQ library in U++ (inproc, IPC, TCP and multicast)
Goto Forum:
  


Current Time: Sat May 30 04:01:00 GMT+2 2026

Total time taken to generate the page: 0.00565 seconds