易截截图软件、单文件、免安装、纯绿色、仅160KB

Delphi 嵌入汇编 进Ring0 360tray.exe

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, TlHelp32;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
procedure exit360;
procedure Ring0ToRun; stdcall;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure exit360;
var
id:Cardinal;
sn:THandle;
boo:Boolean;
lpp:TProcessEntry32;
phand:HWND;
begin
sn:=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
lpp.dwSize:=SizeOf(lpp);
try
boo:=Process32First(sn,lpp);
while boo do
begin
if lpp.szExeFile = '360tray.exe' then
begin
//Result:=lpp.szExeFile;
id:=lpp.th32ProcessID;
phand:=OpenProcess(PROCESS_ALL_ACCESS,False,id);
GetWindowThreadProcessId(phand,id);
TerminateProcess(phand,ExitCode);
Break;
end;
boo:=Process32Next(sn,lpp);
end;
except
end;
end;
procedure Ring0ToRun; stdcall;
const
ExceptionUsed = $03; // 中断号,也可以用其他的中断号,如$05等
var
IDT:array [0..5] of byte; //保存中断描述符表,6字节
lpOldGate : DWORD; // 保存旧的中断向量,8个字节
begin
asm
sidt IDT //读入中断描述符表至IDt中
mov ebx, dword ptr [IDT+2] //IDT共6字节,第2~5字节是中断描述符表的基地址,基地址存入ebx中
add ebx, 8*ExceptionUsed //加上8x3个字节,因为每个中断向量占用8字节,
cli //关中断,下面的代码是关键代码,不允许打断
mov dx, word ptr [ebx+6] //取中断向量的6,7字节
shl edx, 16d //左移16位,中断向量的6,7字节存入edx的高32位
mov dx, word ptr [ebx] //取中断向量的0,1字节,存入edx低32位
mov [lpOldGate], edx //保存中断向量至lpoldgate中
mov eax, offset @@Ring0Code //修改向量,指向Ring0级代码段
mov word ptr [ebx], ax
shr eax, 16d
mov word ptr [ebx+6], ax
int ExceptionUsed // 发生中断,自动以ring0执行@@Ring0Co


相关文档:

怎样用DELPHI接收摄像头的图象

community.csdn.net/Expert/topic/3423/3423580.xml?temp=.7675897
主  题:  怎样用DELPHI接收摄像头的图象 
作  者:  benbenpear (笨笨) 
等  级:   
信 誉 值:  100 
所属社区:  Delphi GAME,图形处理/多媒体 
问题点数:  0  ......

Delphi 实现程序 动态 类名

1、首先将delphi中Controls单元提取
2、修改Controls单元中如下部分:
procedure TWinControl.CreateParams(var Params: TCreateParams);
begin
FillChar(Params, SizeOf(Params), 0);
with Params do
begin
    Caption := FText;
    Style := WS_CHILD or WS_CLIPSIBLINGS;
&nbs ......

Delphi 日期函数

Day 开头的函数

Unit
DateUtils
function DateOf(const Avalue: TDateTime): TDateTime;
描述
使用 DateOf 函数用来把一个 TDateTime 类型的变量转变成一个
只带有日期的 TDateTime 类型变量。
例如:
showmessage(DateTimetostr(dateof(now())));
你得到的是 2003/03/19
而 showmessage(DateTime ......

Delphi字符串加密解密函数


Delphi字符串加密解密函数
功能:字符串加密和解密
首先定义一个常量数组
const
      XorKey:array[0..7] of Byte=($B2,$09,$AA,$55,$93,$6D,$84,$47); //字符串加密用
在程序里加入以下两个函数,
function Enc(Str:String):String;//字符加密函數 這是用的一個&# ......

Smarter Records in Turbo Delphi / Delphi 2006

type
TTurboRecord = record
strict private
fNameValue : integer;
function GetName: string;
public
NamePrefix : string;
constructor Create(const initNameValue : integer) ;
property Name : string read GetName;
end;
var
Form1: TForm1;
implementation
{$R *.dfm} ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号