资源简介
修改代码,随意hook窗口,监控窗口事件。
代码片段和文件信息
/***************************************************************
Module name: HookInjEx.cpp
Copyright (c) 2003 Robert Kuster
Notice: If this code works it was written by Robert Kuster.
Else I don‘t know who wrote it.
Use it on your own risk. No responsibilities for
possible damages of even functionality can be taken.
***************************************************************/
#include
#include “resource.h“
#include “..\HookInjEx_DLL\HookInjEx_DLL.h“
//-----------------------------------------------
// global variables & forward declarations
//
HWND hStart; // handle to start button
BOOL CALLBACK MainDlgProc (HWNDUINTWPARAMLPARAM);
//-----------------------------------------------
// WinMain
//
int APIENTRY WinMain(HINSTANCE hInstance
HINSTANCE hPrevInstance
LPSTR lpCmdLine
int nCmdShow)
{
hStart = ::FindWindow (“Shell_TrayWnd“NULL); // get HWND of taskbar first
hStart = ::FindWindowEx (hStart NULL“BUTTON“NULL); // get HWND of start button
// display main dialog
::DialogBoxParam (hInstance MAKEINTRESOURCE (IDD_WININFO) NULL MainDlgProc NULL);
return 0;
}
//-----------------------------------------------
// MainDlgProc
// Notice: dialog procedure
//
BOOL CALLBACK MainDlgProc (HWND hDlg // handle to dialog box
UINT uMsg // message
WPARAM wParam // first message parameter
LPARAM lParam ) // second message parameter
{
static int bChecked = false;
switch (uMsg) {
case WM_INITDIALOG:
::SetTimer( hDlg 101 300 NULL );
return true;
// if running more instances of HookInjEx
// keep their interface consistent
case WM_TIMER:
bChecked = (IsDlgButtonChecked( hDlg IDC_BUTTON ) == BST_CHECKED);
if( g_bSubclassed && !bChecked) {
::CheckDlgButton( hDlg IDC_BUTTON BST_CHECKED );
::SetDlgItemText( hDlg IDC_BUTTON “Unmap Dll“ );
}
else if (!g_bSubclassed && bChecked) {
::CheckDlgButton( hDlg IDC_BUTTON BST_UNCHECKED );
::SetDlgItemText( hDlg IDC_BUTTON “Inject Dll“ );
}
break;
case WM_COMMAND:
if( !g_bSubclassed) {
InjectDll( hStart );
if( g_bSubclassed )
::SetDlgItemText( hDlg IDC_BUTTON “Unmap Dll“ );
}
else {
UnmapDll();
if( !g_bSubclassed )
::SetDlgItemText( hDlg IDC_BUTTON “Inject Dll“ );
}
break;
case WM_CLOSE:
if( g_bSubclassed )
UnmapDll();
::EndDialog (hDlg 0);
break;
}
return false;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6473 2003-07-22 14:58 HookInjEx_DLL\HookInjEx_DLL.cpp
文件 3977 2003-04-11 00:38 HookInjEx_DLL\HookInjEx_DLL.dsp
文件 733 2003-04-21 18:22 HookInjEx_DLL\HookInjEx_DLL.h
目录 0 2003-07-22 14:58 HookInjEx_DLL\
文件 2590 2003-04-22 07:22 HookInjEx\HookInjEx.cpp
文件 3951 2003-04-11 00:38 HookInjEx\HookInjEx.dsp
文件 766 2001-01-06 16:22 HookInjEx\HookInjEx.ico
文件 3266 2003-04-21 21:57 HookInjEx\HookInjEx.rc
文件 591 2003-04-21 21:57 HookInjEx\resource.h
目录 0 2003-07-22 14:58 HookInjEx\
文件 860 2003-04-11 01:08 HookInjEx.dsw
- 上一篇:微带线计算工具TXLine
- 下一篇:一键隐藏窗口.rar
相关资源
- 已数字签名的cfadisk_X64
- Windows系统时间同步(NTP)工具
- Svn最强大的Windows下实现自动全量增量
- windows.h
- Quartus II 14.0 和破解(windows版)
- Windows下使用NIF扩展Erlang完整
- windows虚拟打印开发设计
- jdk-8u261-x64(含linuxwindowsmacos)
- NVIDIA 显卡驱动for Windows server 2012R2
- NVIDIA显卡2080ti for windows server 2012R2驱动
- Windows核心编程(第五版)中文完整高
- windows 版的 gzip.exe
- 7-zip 批量单个压缩.zip
- ARCGIS9.3 license 破解文件延期!附wind
- Window文件监控微过滤驱动
- windows系统的蜘蛛纸牌
- cuda_8.0.44_windows
- Windows串口编程
- adt-bundle-windows-x86_64-20131030汉化包,中
- 活字格HuoZiGe(forWindows)(6.0.102)安
- windows sdk7.1 64位 iso格式
- jdk-7-windows-x64
- Windows的访问控制机制
- GNU Make For Windows
- Protocol Buffers 2.5.0Windows版
- Beginning WF_Windows Workflow in .NET 4.0一书的
- Eagle 8.6.0 windows版本 破解补丁 V1.0
- Windows剪切板记录器(WinCopy )
- 博客-Windows窗体原理及控件WM_DRAWITEM和
- 微软MP3必用补丁WindowsXP-KB915865-v11-x8
评论
共有 条评论