Log in

View Full Version : WH_JOURNALRECORD Windows CE Global Hook is blocked!


javitobcn
03-24-2005, 06:28 PM
WH_JOURNALRECORD Windows CE Global Hook is blocked!

Hello,

how are you?

You can help me? I'm working in a WINDOWS CE 3.0 project with Microsoft Visual Studio C++ Embedded
3.0, and I'm using a WH_JOURNALRECORD Windows CE global hook.

I create the hook:

m_hHkJournalRec = m_pfSetWindowsJournalHook(WH_JOURNALRECORD, JournalRecordProc, aInstance, 0);

m_pfSetWindowsJournalHook is a pointer to the QASetWindowsJournalHook function, that's in the
coredll.dll library.

I have a JournalRecordProc process, and finally I want to delete the global hook:

m_pfUnhookWindowsJournalHook(m_hHkJournalRec)

where m_pfUnhookWindowsJournalHook is a pointer to the QAUnhookWindowsJournalHook function, that's in
the coredll.dll library.

And my problem, is that this function returns false, instead of true, and that wants to say that
the global hook isn't deleted correctly, and the system resources are not free. In addition, when
my application finishes in the Pocket PC, the PDA becomes blocked, and it doesn't detect any other
keyboard or mouse event, and I have to do a software reset.

There is a function, called GetLastError(), that gives you the last error that happens in the
system, but this function returns 0, that wants to say, "all is correct". Someone can help me, and
knows how delete this global hook correctly?

HINSTANCE aInstance = GetModuleHandle(NULL); --> aInstance makes reference to real module, not
to a dll, it's not necessary! (it can be also an EXE file);

What do you think about it?

Thanks,

Sincerely,

javitobcn (barcelona SPAIN).

DarkHelmet
03-24-2005, 06:34 PM
This is primarily a user site, not a developer site. You might try here:

http://www.pocketpcdn.com/

Best regards!

javitobcn
03-25-2005, 12:52 PM
OK! I thought I was in developer's section. Thanks,

Sincerely,

javitobcn

Steven Cedrone
03-25-2005, 02:44 PM
This is primarily a user site, not a developer site. You might try here:

http://www.pocketpcdn.com/

Best regards!

There ARE developers that frequent this site, that is why there is a developer forum!