apegios
14-12-2004, 02:58 PM
program inject_IE;
uses Windows, madCodeHook;
var si : TStartupInfo;
pi : TProcessInformation;
begin
ZeroMemory(@si, sizeOf(si));
CreateProcessEx(nil, 'C:Program FilesInternet ExplorerIEXPLORE.EXE', nil, nil, false, 0, nil, nil, si, pi, 'dll_IE.dll');
end.
//============================================================================================
DLL...............
library dll_IE;
uses Windows, Messages;
var
wclass : TWndclass;
msg : TMsg;
hinst,khdl : HWnd;
function WindowProc(hWnd,Msg,wParam,lParam:Longint):Longint; stdcall;
begin
Result:=DefWindowProc(hWnd,Msg,wParam,lParam);
case Msg of
WM_CREATE: windows.Beep(900,400);
WM_DESTROY: ExitProcess(hinst);
end;
end;
procedure CreateWND;
begin
hInst:=GetModuleHandle(nil);
with wClass do begin
Style:=CS_PARENTDC;
hIcon:=LoadIcon(hInst,'MAINICON');
lpfnWndProc:=@WindowProc;
hInstance:= hInst;
hbrBackground:=COLOR_BTNFACE+1;
lpszClassName:='klass';
hCursor:=LoadCursor(0,IDC_ARROW);
end;
RegisterClass(wClass);
khdl:=CreateWindow('klass','Neoclassic',WS_SYSMENU,
10,10,300,200,0,0,hInst,nil);
ShowWindow(khdl,SW_SHOWNORMAL);
while (GetMessage(Msg,khdl,0,0)) do begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;
begin
CreateWND;
end.
uses Windows, madCodeHook;
var si : TStartupInfo;
pi : TProcessInformation;
begin
ZeroMemory(@si, sizeOf(si));
CreateProcessEx(nil, 'C:Program FilesInternet ExplorerIEXPLORE.EXE', nil, nil, false, 0, nil, nil, si, pi, 'dll_IE.dll');
end.
//============================================================================================
DLL...............
library dll_IE;
uses Windows, Messages;
var
wclass : TWndclass;
msg : TMsg;
hinst,khdl : HWnd;
function WindowProc(hWnd,Msg,wParam,lParam:Longint):Longint; stdcall;
begin
Result:=DefWindowProc(hWnd,Msg,wParam,lParam);
case Msg of
WM_CREATE: windows.Beep(900,400);
WM_DESTROY: ExitProcess(hinst);
end;
end;
procedure CreateWND;
begin
hInst:=GetModuleHandle(nil);
with wClass do begin
Style:=CS_PARENTDC;
hIcon:=LoadIcon(hInst,'MAINICON');
lpfnWndProc:=@WindowProc;
hInstance:= hInst;
hbrBackground:=COLOR_BTNFACE+1;
lpszClassName:='klass';
hCursor:=LoadCursor(0,IDC_ARROW);
end;
RegisterClass(wClass);
khdl:=CreateWindow('klass','Neoclassic',WS_SYSMENU,
10,10,300,200,0,0,hInst,nil);
ShowWindow(khdl,SW_SHOWNORMAL);
while (GetMessage(Msg,khdl,0,0)) do begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;
begin
CreateWND;
end.