解决方案 »
- 如何用DBComboBox输出SQL不重复查找的结果?
- 求职,4年开发经验,对Delphi极为熟悉,人在深圳,但想去上海或厦门。
- 高手帮忙!如何通过调用SQL脚本文件建立数据库
- 请教 Delphi控制Excel的问题!
- [随笔]今夜无眠。。。。。。
- 请教各位大侠:有关数据库的导入导出
- 很简单的问题,请指教
- 出错处理不执行,应该是个简单问题。
- 修改一个小小的delphi远程数据下载控件;给分数或者给¥¥¥,自己选择~
- http://www.csdn.net/expert/topic/408/408678.shtm******分了!!!!!!!!
- 安装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