Re: Intercept windows messager on WindowsCE



I have no idea if you'll get all that. It's completely undocumented, so
you'll have to find out for yourself if it will report all of those events
or not. I was in the middle of trying it when I found the low-level
keyboard hook and that was exactly what I needed, so...

Paul T.

<andrerus@xxxxxxxxx> wrote in message
news:1156953054.181666.74990@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
What exactly hook JournalRecord?
What I need is records of:
key pressed, tap, opening of new window, closing of windows, and
virtually everything can help to reproduce the entire interaction.

Really thanks for your help.

Andrea


Paul G. Tobey [eMVP] ha scritto:

The last time I checked, yes, they were the only ones supported for
windows
hooks. Whether it's enough for you or not depends on what you mean by
"interaction between users and a specified appl". The low-level keyboard
hook which report all keys, but no mouse/touch operations, so that's out
for
most possible interpretations of what you're talking about. Journal
record
is really your only chance...

Paul T.

<andrerus@xxxxxxxxx> wrote in message
news:1156948540.266565.190530@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Testing my appl I receive always an error 87 (invalid parameter). I
used the function to record WH_GETMESSAGE, then, surfing, I found a
post dated 2001 saying that the only recognized param were:

#define WH_JOURNALRECORD 0
#define WH_JOURNALPLAYBACK 1
#define WH_KEYBOARD_LL 20.

Does anyone know if these are stil the only usable params?
I need to monitor the interaction between users and a specified appl,
you think it is possible even using only these params?

Thanks, Andrea

andrerus@xxxxxxxxx ha scritto:

Thank you very much, now it seems build.

Andrea


Paul G. Tobey [eMVP] ha scritto:

Sorry, yes, there's a problem with that definition of
SetWindowsHookEx.
It's actually declared as SetWindowsHookExW() with that parameter
signature,
otherwise. This has to do with how Unicode/ANSI declarations are
handled.
You can either #define SetWindowsHookEx SetWindowsHookExW or change
your
declaration and the call to it.

Paul T.

<andrerus@xxxxxxxxx> wrote in message
news:1155924580.082984.4200@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm sorry if the following question could seem stupid, but I'm
approaching to Windows programming only and I'm almost obliged to
face
not simple problems:

As you cleared, I defined coredll required function into my DLL as
extern "C", as you can see by following code:

//Declarations to cover WindowsCE headers lack (Andrea Russino)
extern "C"{
typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam,
LPARAM
lParam);

HHOOK SetWindowsHookEx(
int idHook,
HOOKPROC lpfn,
HINSTANCE hMod,
DWORD dwThreadId
);

BOOL UnhookWindowsHookEx(
HHOOK hhk
);

LRESULT CallNextHookEx(
HHOOK hhk,
int nCode,
WPARAM wParam,
LPARAM lParam
);
}

but I try to build my DLL a linking error occurr:
LNK2019: unresolved external symbol SetWindowsHookEx referenced in
function MySetHook.

I tried also to explicitly reference coredll.lib, adding it into
"Additional Dipendecies" voice on ProjectSettings.

Where am I mistaken?

Your help is very precious for me, Thanks.

Andrea



Paul G. Tobey [eMVP] ha scritto:

Yes, the declaration for that doesn't appear in any standard SDK
for
Windows
CE. You could, I suppose declare it yourself (it's defined in
coredll.lib,
so linking shouldn't be a problem). It's not really supported,
though,
so
that, I presume, is why it's not declared in the SDK header
files.
I'm,
frankly, not sure if it will do journaling or getmessage hooks,
anyway;
it's
not really supported.

You could superclass every window in the application you're
trying
to
track,
if you don't have the source for it. If you do have the source,
have it
log
it's own messages.

OpenNETCF is for managed code only (C#/VB.NET), and it won't do
the
message
filtering operation for a random second application; it allows an
application to decide that it might want to filter some of its
own
messages.

Paul T.

<andrerus@xxxxxxxxx> wrote in message
news:1155838149.016670.160910@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I'm looking for a way to intercept all Windows Messages sent to
a
specific application so as let my application to record user
interaction of a second (specified) application. I thought to
global
hooks, but I don't know if it is admitted to track
WH_GETMESSAGE
and
moreover I can't compile the required C++ DLL because of an
"identifier
not found" error related to SetWindowsHookEx.

Then I discovered the class
OpenNETCF.Windows.Forms.Application2
that
"Provides static (Shared in Visual Basic) methods and
properties
to
manage an application, such as methods to start and stop an
application, to process Windows messages, and properties to get
information about an application. This class cannot be
inherited",

(http://www.opennetcf.org/library/)
but I'd like don't understand if, launching the application to
controll
from my app, I can intercept messages addressed to the second
application.

Does anybody can help me, giving me some indication of how
proceed, or
where I can find it?

Thanks

Andrea






.



Relevant Pages

  • Re: Intercept windows messager on WindowsCE
    ... This has to do with how Unicode/ANSI declarations are handled. ... approaching to Windows programming only and I'm almost obliged to face ... typedef LRESULT (int code, WPARAM wParam, LPARAM ... HHOOK SetWindowsHookEx( ...
    (microsoft.public.windowsce.app.development)
  • Re: Intercept windows messager on WindowsCE
    ... The last time I checked, yes, they were the only ones supported for windows ... This has to do with how Unicode/ANSI declarations are ... HHOOK SetWindowsHookEx( ... frankly, not sure if it will do journaling or getmessage hooks, ...
    (microsoft.public.windowsce.app.development)
  • Re: Intercept windows messager on WindowsCE
    ... Paul G. Tobey ha scritto: ... This has to do with how Unicode/ANSI declarations are handled. ... approaching to Windows programming only and I'm almost obliged to face ... HHOOK SetWindowsHookEx( ...
    (microsoft.public.windowsce.app.development)
  • Re: Intercept windows messager on WindowsCE
    ... Sorry, yes, there's a problem with that definition of SetWindowsHookEx. ... This has to do with how Unicode/ANSI declarations are handled. ... approaching to Windows programming only and I'm almost obliged to face ... typedef LRESULT (int code, WPARAM wParam, LPARAM ...
    (microsoft.public.windowsce.app.development)
  • Re: Intercept windows messager on WindowsCE
    ... Paul G. Tobey ha scritto: ... approaching to Windows programming only and I'm almost obliged to ... HHOOK SetWindowsHookEx( ... frankly, not sure if it will do journaling or getmessage hooks, ...
    (microsoft.public.windowsce.app.development)