[delphi]SetWindowsHookExA函数入口处修改
library Project2; uses
SysUtils,
Classes,
windows,
Dialogs;
{$R *.res} function GetModuleHandleA(a: string): Integer; stdcall; external 'kernel32.dll'
{取程序或DLL句柄
a:DLL名
} function GetProcAddress(a: integer; b: string): Integer; stdcall; external 'kernel32.dll'
{取DLL函数地址
a:模块句柄
b:函数名
} function GetCurrentProcess: Integer; stdcall; external 'kernel32.dll'
{取伪句柄
} function Test11(aa: string): string;
begin Result := aa;
end;
var
b: array[..] of byte = ($C2, $, $);
function Test2(): Integer;
var
a: Integer;
c: Integer;
WriteByte: DWORD;
begin
//GetModuleHandleA('user32.dll');
a := GetModuleHandleA('user32.dll');
c := GetProcAddress(a, 'SetWindowsHookExA');
WriteProcessMemory(GetCurrentProcess(), Pointer(c), @b[], , WriteByte);
ShowMessage('hook成功');
Result := ;
end; exports
Test2;
begin
Test2();
end.
[delphi]SetWindowsHookExA函数入口处修改的更多相关文章
- Delphi 调用netsh命令修改IP地址
Delphi 调用netsh命令修改IP地址 先介绍一下Netsh命令的使用方法: 在这里跟大家介绍几个简单的指令 1.Show IP 1.1Cmd Mode 直接在cmd下面输入 netsh int ...
- Delphi程序的自我修改
前言: 对于Delphi在编译时对代码所做的工作,大部分使用Object Pascal之类的高级语言的程序员并不是很熟悉.如果你对汇编程序以及EXE文件格式有一点基本认识,那么源代码里包含的注 ...
- delphi公共函数 UMyPubFuncFroc--版权所有 (C) 2008 勇者工作室
{*******************************************************} { } { Delphi公用函数单元 } { } { 版权所有 (C) 2008 勇 ...
- (转载)delphi 常用函数(数学)
delphi 常用函数(数学) Delphi中怎么将实数取整? floor 和 ceil 是 math unit 里的函数,使用前要先 Uses Math.trunc 和 round 是 system ...
- Delphi回调函数及其使用
Delphi回调函数及其使用 1 回调函数的概述 回调函数是这样一种机制:调用者在初始化一个对象(这里的对象是泛指,包括OOP中的对象.全局函数等)时,将一些参数传递给对象,同时将一个调用者可以访问的 ...
- Delphi过程函数传递参数的八种方式
今天一同事问我为什么有些过程函数里面有Var而有些没有,不解,遂到网上百度,得解.快哉,快哉. 在Delphi过程.函数中传递参数几个修饰符为Const.Var.Out.另一种不加修饰符的为默认按值传 ...
- delphi字符串函数大全
转帖:delphi字符串函数大全 2009-11-17 16:43:55 分类: delphi字符串函数大全 ━━━━━━━━━━━━━━━━━━━━━首部 function StringToGUID ...
- Delphi 常用函数(数学函数)round、trunc、ceil和floor
源:Delphi 常用函数(数学函数)round.trunc.ceil和floor Delphi 常用函数(数学) Delphi中怎么将实数取整? floor 和 ceil 是 math unit 里 ...
- delphi公用函数
{*******************************************************} { } { Delphi公用函数单元 } { } { 版权所有 (C) 2008 } ...
随机推荐
- DOJO DOM 功能
In this tutorial, you'll learn about how to use Dojo to manipulate the DOM in a simple, cross-browse ...
- 通过Daffodil for VS使VS2010的IDE可以用VC6 VC7.1 VC9等编译器进行项目编译
本文内容中的部分资料和知识来源于网络,具体引用出处不明. VS的IDE从VC6到VS2010的变化可谓是天翻地覆,最新的VS2010有一个特性就是支持多显示器开发,这无疑为我们的开发带来很大的便利. ...
- delphi cmd
今天看到有人在问用代码执行CMD命令的问题,就总结一下用法,也算做个备忘. Delphi中,执行命令或者运行一个程序有2个函数,一个是winexec,一个是shellexecute.这两个大家应该都见 ...
- 最小安装模式下Centos7.*网卡启动配置
最小安装模式下的Centos7.*系统默认情况下,网卡是不启动的.为了解决联网问题,自己搜集了点资料,成功连接了网络.并梳理了下处理过程. 1.首先运行ip addr命令,查看配置文件的名称.有的文章 ...
- Creating a radius based VPN with support for Windows clients
This article discusses setting up up an integrated IPSec/L2TP VPN using Radius and integrating it wi ...
- C#的互操作性:缓冲区、结构、指针
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- Geodatabase数据模型
1 Geodatabase概念 Geodatabase是ArcInfo8引入的一种全新的面向对象的空间数据模型,是建立在DBMS之上的统一的.智能的空间数据模型.“统一”是指,Geodatabase ...
- 谈谈javascript放在哪里更合适
关于javascript放在哪里更合适 脚本位置: 例如以下代码: <html> <head> <title>Script Example</title&g ...
- js正则表达式replace里有变量的解决方法用到RegExp类
一直比较害怕使用正则表达式,貌似很深奥很复杂的样子,所以在用js操作字符串的时候,我最多使用的是replace.split.substring.indexOf等函数,这些函数有时候需要多次叠加使用,但 ...
- PIC32MZ tutorial -- Core Timer
Core Timer is a very popular feature of PIC32 since it is a piece of the MIPS M4K core itself and is ...