Re: Hooks
- From: RLN <RLN@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 17 Jul 2006 22:01:02 -0700
Thanks for solution. now i am able to writing to a file.
Now I have another problem kindly suggest some more.
I Implemented Windows HOOKs for WH_CALLWNDPROC and WH_CALLWNDPROCRET
I am able to hook the messages related to control using this.
Using this I am able to whethere check box is checked or unchecked ,check
box name etc....
But only all the control created in win32 or MFC not created by Visual Basic.
After find information using spy++ I got controls created by visual basic is
giving WM_COMMAND message and notifications
Even touch I am not able to find the match of control notification
equivalent in win32 control notification.
I need more explaination about hooking and getting those informations.
--
WM_QUIT
RLN
"Gary Chanson" wrote:
The file handle is specific to the process it was created in. To get a.
handle usable in the target process, either open the file in that processes
(using the appropriate sharing mode) or use Duplicate handle to get a handle
to the file object in the parent process which is specific to the target
process.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
"RLN" <RLN@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F4C474D8-4D2E-4A8F-96D2-D3D5BAAAD181@xxxxxxxxxxxxxxxx
Thanks for replies.
Now I have set the hook I am getting those messages.
everything Implemented in DLL.
I have written a call for displaying messages using OutputDebugString API.
But I need all messages should be written to a file.
while Installing I am able to create a file and able to write also.
But In call back function of HOOKProcedure I am not able to access the
file
handle and not able to write to file.
file handle is global. (it is giving invalid handle)
Kindly suggest some solution for these.
I need to write all the hooked message to a file.
--
WM_QUIT
RLN
"Gary Chanson" wrote:
You will probably need several hooks to intercept all of them. Most
of
them will probably require a WH_CALLWNDPROC hook. Study the information
in
the MSDN entry for SetWindowsHookEx and experiment. ;)
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
"RLN" <RLN@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F017B784-6586-4052-8F94-F3DB97412E73@xxxxxxxxxxxxxxxx
I need to monitor the following messages.
Button/EditBox /etc... Messages Simply All control Messages.
Regular Window Messages.
Common Control Messages.
DialogBox Messages
DialogBox/Messages Box Notifications (Example while entering text in
editbox
it is popping a message box in the middle - I need to catch this also)
--
WM_QUIT
RLN
"Gary Chanson" wrote:
For what? The hook type depends on what type of messages you
want
to
intercept.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
"RLN" <RLN@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E1350FE2-AA07-44EA-96B1-D72B2D0813EB@xxxxxxxxxxxxxxxx
ok.
Which type hook I need to use for this?
--
WM_QUIT
RLN
"Gary Chanson" wrote:
No. That ID identifies the thread which created that
window.
That's
all. If additional threads create other windows, you need to
get
those
IDs
separately.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
"RLN" <RLN@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:682A4063-4421-4A88-A8C8-DCFBEE818A22@xxxxxxxxxxxxxxxx
ok I agree.
But GetWindowThreadId returns one ThreadId
Is that thread id is possible for these concept (all child
windows
of
Internet Explorer)?
--
WM_QUIT
RLN
"Gary Chanson" wrote:
"RLN" <RLN@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:64F7CA66-A68C-4DCC-B1B1-8DEDE45890B9@xxxxxxxxxxxxxxxx
Consider In this Example targeted Window is Internet
Explorer
Window.
If I set Hook for Internet Explorer Window.
Shall I able to Catch all the message of the all child
windows?
Is it possible to monitor messages of the Combo Box (which
is
child of
Internet Explorer )?
I need to monitor all the message related to the all child
windows?
I told here only one child window
But it may be any number of child windows ?
Is it necessary to set hook for each seperate child
window?
or
Targeted window is enough for hook ?
I need to log all the child windows data changes ( when
message
occurs
data
will change. so i need to log event and data)
Windows hooks are not window specific, they are thread
specific.
When
you set a hook on Internet Explorer, you are probably
setting a
hook
on
the
thread which created the main IE window. Your hook handler
will
intercept
all messages (of the type for the specific hook) to that
thread.
If
a
different thread creates a child window, your hook handler
will
not
intercept its messages.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
- Follow-Ups:
- Re: Hooks
- From: Gary Chanson
- Re: Hooks