K
K
Kalombyr2020-06-14 16:32:08
DLL
Kalombyr, 2020-06-14 16:32:08

How to intercept window events from an embedded dll?

There is a program, I want to transfer frequently used actions to buttons ("ToolbarWindow32"), for this I implemented my dll using "CreateRemoteThread", I created the buttons, everything is ok.
There was a problem with handling pressing. As far as I understand, you need to track the WM_COMMAND call somehow.

If you do it through "SetWindowsHook", in fact, the same dll will be injected again ...
but then you will have to keep the injecting program running all the time while the main one is running - and this would not be desirable.
In general, how to proceed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Armenian Radio, 2020-06-15
@Kalombyr

https://docs.microsoft.com/en-us/windows/win32/api...
With the GWL_WNDPROC parameter
Push your window procedure and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question