(*//
說明:window2000+delphi6除錯通過
設計:zswang
支援:wjhu111@21**.***
日期:2005-02-22
//*)
uses ***mctrl
;function getstatusbartext
(mhandle
:thandle
):string;
var
vbuffer
:array[
0..
$1000]
of char
;vsize
:integer;i
:integer
;vcount
:integer
;vprocessid
:dword
;vprocess
:thandle
;vpointer
:pointer
;vnumberofbytesread
:cardinal
;begin
result
:=''
;vcount
:=sendmessage
(mhandle
,sb_getparts
,0,
0);
if vcount
<=
0 then exit
;getwindowthreadprocessid
(mhandle,@
vprocessid
);vprocess
:=openprocess
(process_vm_operation
or process_vm_read
or
process_vm_write
,false
,vprocessid
);vpointer
:=virtualallocex
(vprocess
,nil,
$1000,
mem_reserve
or mem_***mit
,page_readwrite
);try
for i
:=0 to vcount
-1 do
begin
vsize
:=sendmessage
(mhandle
,sb_gettext,i
,0)
+1;
sendmessage
(mhandle
,sb_gettext,i
,integer
(vpointer
));readproces**emory
(vprocess
,vpointer,@
vbuffer
[0],
vsize
,vnumberofbytesread
);result
:=result+#9
+vbuffer
;end;
delete
(result
,1,
1);
finally
virtualfreeex
(vprocess
,vpointer
,0,
mem_release
);closehandle
(vprocess
);end;
end;
//example
procedure tform1
.formcreate
(sender
:tobject
);begin
registerhotkey
(handle
,1,
mod_win
,vk_f2
);end;
procedure tform1
.formdestroy
(sender
:tobject
);begin
unregisterhotkey
(handle
,1);
end;
procedure tform1
.wmhotkey
(var msg
:twmhotkey
);begin
case msg
.hotkey
of
1:
edit1
.text
:=getstatusbartext
(windowfrompoint
(point
(mouse
.cursorpos.x
,mouse
.cursorpos.y
)));
end;
end;
VC獲取其他程序ListCtrl內容
vc讀寫其他程序listctrl資料到本程序的例項,下面用windows工作管理員來做測試 1 捕獲視窗控制代碼 用spy 可以看到如下父子視窗關係 新增listctrl,設定style report 關聯控制元件變數m listctrl,再新增一個按鈕,如下圖 4 程式不足 a 在獲取工作管理員 ...
VC獲取其他程序ListCtrl內容
vc讀寫其他程序listctrl資料到本程序的例項,下面用windows工作管理員來做測試 1 捕獲視窗控制代碼 用spy 可以看到如下父子視窗關係 新增listctrl,設定style report 關聯控制元件變數m listctrl,再新增一個按鈕,如下圖 2 相關 view plain co...
獲取其他程序的命令列
type unicode string packed record length word maximumlength word buffer pwidechar end punicode string unicode string type process parameters packed re...
獲取其他程序的fs暫存器
由於fs暫存器裡面有很多資訊可用,so 在不注入的情況下采用暴力搜尋。我不知道有沒有更高階的辦法。nt teb 0x000 nttib nt tib 0x000 exceptionlist ptr32 0x004 stackbase ptr32 0x008 stacklimit ptr32 0x00...
讀取其他程序的資料
typedef struct tagwndinfo wndinfo,lpwndinfo bool callback myenumproc hwnd hwnd,lparam lparam 列舉所有程序 if iswindowvisible hwnd 當前視窗是否可見 return true hwnd ...