⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exports.h

📁 Hook API 实现文件名自动变换。并提供相关的测试程序。
💻 H
字号:
/*========================================================================
文件: exports.h
说明:全局消息钩子 
时间:2004-09-15
编写:oshj || oshj@21cn.com
环境:VC6.0/Win2000 Pro/SP4/1024*768
特别说明:本程序目的是更改其他程序窗口的显示内容(如数值)。用枚举主窗口
		  和子窗口的方法只能只能找到有句柄的控件,发消息进行更改。对无句柄
		  的控件就无能为力了,在spy++里都无法枚举Delphi/BCB/VB的label控件的
		  只能采用截获TextOut的方法了,没想到其他更好的办法:-)这种就是
		  所谓的屏幕取词技术了,金山词霸用的就是这种方法。
=========================================================================*/
//-------------------------------------------------------------------------
#ifndef _INC_EXPORTS
#define _INC_EXPORTS

#include <windows.h>
#include <stdio.h>
//-------------------------------------------------------------------------
#define DLLEXPORT __declspec(dllexport)
//-------------------------------------------------------------------------
#define MAX_TEXTLEN 1024
#define UM_GETTEXT WM_USER + 0x392
//-------------------------------------------------------------------------
//开始钩
void HookAllTextOut();
//停止钩子
void UnHookAllTextOut();
//-------------------------------------------------------------------------
//消息回调函数
LRESULT CALLBACK GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam);
//枚举子窗体回调函数
BOOL CALLBACK EnumChildWindowsProc( HWND hWnd, LPARAM lParam );
//-------------------------------------------------------------------------
// hook api
DLLEXPORT BOOL WINAPI NHBitBlt(HDC hdcDest,
						       int nXDest,
						       int nYDest,
						       int nWidth,
						       int nHeight,
						       HDC hdcSrc,
						       int nXSrc,
						       int nYSrc,
						       DWORD dwRop);

DLLEXPORT BOOL WINAPI NHTextOutA(HDC hdc,
							     int nXStart,
							     int nYStart,
							     LPCTSTR lpString,
							     int cbString);

DLLEXPORT BOOL WINAPI NHTextOutW(HDC hdc,
							     int nXStart,
							     int nYStart,							     
								 LPCWSTR lpString,
							     int cbString);

DLLEXPORT BOOL WINAPI NHExtTextOutA(HDC hdc,
								    int X,
								    int Y,
								    UINT fuOptions,
								    CONST RECT *lprc,
								    LPCTSTR lpString,
								    UINT cbCount,
								    CONST INT *lpDx);

DLLEXPORT BOOL WINAPI NHExtTextOutW(HDC hdc,
								    int X,
								    int Y,
								    UINT fuOptions,
								    CONST RECT *lprc,
									LPCWSTR lpString,
								    UINT cbCount,
								    CONST INT *lpDx);

//-------------------------------------------------------------------------

#endif // _INC_EXPORTS

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -