Using sytem wide hooks ,spyworks(cross task subclassing clone
by Venkat Mani (15 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating:
(9 Votes)
Using system wide hooks in VB. Showing you how you can add menu's to other applications and react to their click button.With system wide hooks the limitations of modifying only those applications run in the same process ceases to exist. Do vote for me if u like the code
Inputs
Here is the source code of the dll made in c++
#include
int prevmnu;
int prevmsg;
int currmnu;
int currmsg;
HWND hndl;
LRESULT CALLBACK CallWndProc(
int nCode, // hook code
WPARAM wParam, // type of hook about to be called
LPARAM lParam // address of structure with debugging information
)
{
if (nCode>=0)
{
HWND trt=FindWindow(NULL,"Untitled - NotePad");
CWPSTRUCT *wt=(CWPSTRUCT*)lParam;
if (trt==wt->hwnd)
{
if(((wt->message) < 289 ) ||((wt->message) > 289 ) )
{
prevmsg=currmsg;
prevmnu=currmnu;
currmsg=wt->message ;
currmnu=LOWORD(wt->wParam);
}
if(currmsg==293)
if(prevmsg==WM_MENUSELECT)
if (prevmnu==35){
hndl=GetWindow(trt,GW_CHILD);
MessageBox(0,"You clicked a menu made by the dude","The dude rocks!!!",0);
if(hndl>0)
SendMessage(hndl,WM_SETTEXT,NULL,(LPARAM)"This was printed by the dude's program!!!!");
hndl=0;
} } }
return CallNextHookEx(NULL, nCode, wParam, lParam);
}
Rate Using sytem wide hooks ,spyworks(cross task subclassing clone
Download Using sytem wide hooks ,spyworks(cross task subclassing clone
Download Using sytem wide hooks ,spyworks(cross task subclassing clone (13 KB)
Using sytem wide hooks ,spyworks(cross task subclassing clone Comments
No comments have been posted about Using sytem wide hooks ,spyworks(cross task subclassing clone. Why not be the first to post a comment about Using sytem wide hooks ,spyworks(cross task subclassing clone.
Post your comment