翻译!从进程中取QQ号码!急,求助!分不够可加,最高800!(200分)

  • 主题发起人 主题发起人 moonight59
  • 开始时间 开始时间
M

moonight59

Unregistered / Unconfirmed
GUEST, unregistred user!
有这么一段易语言写的内容,我想转成Delphi的,但是始终不行,请帮忙。<br>后面我会贴出我写的代码,请会做的朋友帮我改错或者另外写一份!<br>=================================================================<br>.程序集 窗口程序集1<br>.程序集变量 关键字, 字节集, , , /MsgEx.db<br>.程序集变量 路径分隔符, 字节集, , , /<br>.程序集变量 QQ进程名, 文本型, , , QQ.EXE<br>.程序集变量 耗时, 整数型<br><br>.子程序 _开始搜索_被单击<br>.局部变量 进程句柄, 整数型<br>.局部变量 进程快照, 整数型<br>.局部变量 进程信息, PROCESSENTRY32<br><br>耗时 = 取启动时间 ()<br><br>QQ进程名 = “QQ.EXE”<br>路径分隔符 = 到字节集 (“/”)<br>关键字 = 到字节集 (“/MsgEx.db”)<br><br>进程快照 = CreateToolhelp32Snapshot (#TH32CS_SNAPALL, 0)<br>.如果真 (进程快照 = 0)<br> &nbsp; &nbsp;信息框 (“创建进程快照列表失败 .”, #信息图标, “提示”)<br> &nbsp; &nbsp;返回 ()<br>.如果真结束<br>进程信息.dwSize = 296 &nbsp;' = len (uProcess)<br>进程句柄 = Process32First (进程快照, 进程信息)<br><br>列表框1.清空 ()<br>.判断循环首 (进程句柄 ≠ 0)<br> &nbsp; &nbsp;.如果真 (寻找文本 (到文本 (进程信息.szExeFile), QQ进程名, , 真) ≠ -1)<br> &nbsp; &nbsp; &nbsp; &nbsp;列表框1.加入项目 (“ID: ” + 到文本 (进程信息.th32ProcessID) + “ &nbsp; &nbsp;QQ号码: ” + 查找QQ号码 (进程信息.th32ProcessID), )<br> &nbsp; &nbsp;.如果真结束<br> &nbsp; &nbsp;进程句柄 = Process32Next (进程快照, 进程信息)<br>.判断循环尾 ()<br>CloseHandle (进程快照)<br><br>耗时 = 取启动时间 () - 耗时<br>标签1.标题 = “耗时: ” + 到文本 (耗时) + “ 毫秒”<br><br>.子程序 查找QQ号码, 文本型<br>.参数 进程ID, 整数型<br>.局部变量 操作句柄, 整数型<br>.局部变量 内存地址, 整数型<br>.局部变量 读取结果, 整数型<br>.局部变量 内存块长度, 整数型<br>.局部变量 开始地址, 整数型<br>.局部变量 结束地址, 整数型<br>.局部变量 数据缓冲区, 字节集<br>.局部变量 QQ号码, 文本型<br>.局部变量 内存块信息, MEMORY_BASIC_INFORMATION<br>.局部变量 地址偏移, 整数型<br>.局部变量 地址值, 字节型<br><br>操作句柄 = OpenProcess (#PROCESS_VM_READ + #PROCESS_QUERY_INFORMATION, 0, 进程ID)<br>.如果真 (操作句柄 = 0)<br> &nbsp; &nbsp;信息框 (“不能打开进程 .”, #信息图标, “提示”)<br> &nbsp; &nbsp;返回 (“”)<br>.如果真结束<br><br>内存块长度 = 28<br>.判断循环首 (真)<br> &nbsp; &nbsp;.如果真 (VirtualQueryEx (操作句柄, 内存地址, 内存块信息, 内存块长度) = 0)<br> &nbsp; &nbsp; &nbsp; &nbsp;CloseHandle (操作句柄)<br> &nbsp; &nbsp; &nbsp; &nbsp;返回 (“”)<br> &nbsp; &nbsp;.如果真结束<br><br> &nbsp; &nbsp;.如果真 (内存块信息.Type = #MEM_PRIVATE 且 内存块信息.Protect = #PAGE_READWRITE)<br> &nbsp; &nbsp; &nbsp; &nbsp;数据缓冲区 = 取空白字节集 (内存块信息.RegionSize)<br> &nbsp; &nbsp; &nbsp; &nbsp;读取结果 = ReadProcessMemory (操作句柄, 内存地址, 数据缓冲区, 内存块信息.RegionSize, 0)<br> &nbsp; &nbsp; &nbsp; &nbsp;.如果 (读取结果 ≠ 0)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;结束地址 = 寻找字节集 (数据缓冲区, 关键字, )<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.判断循环首 (结束地址 ≠ -1)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;开始地址 = 倒找字节集 (数据缓冲区, 路径分隔符, 结束地址 - 1)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.如果真 (开始地址 ≠ -1 且 结束地址 - 开始地址 < 16 且 结束地址 - 开始地址 > 4)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.变量循环首 (开始地址 + 1, 结束地址 - 1, 1, 地址偏移) &nbsp;' 判断是否为数字格式<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;地址值 = 取字节集数据 (取字节集中间 (数据缓冲区, 地址偏移, 1), #字节型)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.如果真 (地址值 < 48 或 地址值 > 57)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;跳出循环 ()<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.如果真结束<br><br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.变量循环尾 ()<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.如果真 (地址偏移 = 结束地址)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QQ号码 = 取字节集数据 (取字节集中间 (数据缓冲区, 开始地址 + 1, 结束地址 - 开始地址 - 1), #文本型)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CloseHandle (操作句柄)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;返回 (QQ号码)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.如果真结束<br><br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.如果真结束<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;结束地址 = 寻找字节集 (数据缓冲区, 关键字, 结束地址 + 1)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.判断循环尾 ()<br> &nbsp; &nbsp; &nbsp; &nbsp;.否则<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;' 输出调试文本 (“不能读取内存块: ” + 到文本 (内存地址))<br> &nbsp; &nbsp; &nbsp; &nbsp;.如果结束<br><br> &nbsp; &nbsp;.如果真结束<br> &nbsp; &nbsp;内存地址 = 内存地址 + 内存块信息.RegionSize<br>.判断循环尾 ()<br>CloseHandle (操作句柄)<br>返回 (“”)<br>==========================================================<br><br><br>我的程序代码:<br>==========================================================<br>unit Unit1;<br><br>interface<br><br>uses<br> &nbsp;Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> &nbsp;Dialogs, ComCtrls, UnitEndQQ, StdCtrls;<br><br>type<br> &nbsp;TForm1 = class(TForm)<br> &nbsp; &nbsp;List: TListView;<br> &nbsp; &nbsp;btn1: TButton;<br> &nbsp; &nbsp;procedure ListDblClick(Sender: TObject);<br> &nbsp; &nbsp;procedure btn1Click(Sender: TObject);<br> &nbsp;private<br> &nbsp; &nbsp;{ Private declarations }<br> &nbsp;public<br> &nbsp; &nbsp;{ Public declarations }<br> &nbsp;end;<br><br>var<br> &nbsp;Form1: TForm1;<br><br>implementation<br><br>{$R *.dfm}<br><br>function IsNum(str: string): Boolean;<br>var<br> &nbsp;i: Integer;<br>begin<br> &nbsp;Result:=TryStrToInt(str,i);<br>end;<br><br>procedure GetInfoFromProcess(var NumList, PIDList: TStringList);<br>var<br> &nbsp;i,position: Integer;<br> &nbsp;PIDlistTemp: TStringList;<br> &nbsp;Phd, n: Cardinal;<br> &nbsp;bAddr: DWORD;<br> &nbsp;MyChars: array of Char;<br> &nbsp;PInfo, QQnum: string;<br> &nbsp;Sys_Info: _SYSTEM_INFO;<br> &nbsp;MemInfo: MEMORY_BASIC_INFORMATION;<br> &nbsp;find: Boolean;<br>begin<br> &nbsp;PIDlistTemp:=TStringList.Create;<br> &nbsp;GetProcessIDs('QQ.exe',PIDlistTemp);<br> &nbsp;PIDList.Assign(PIDlistTemp);<br> &nbsp;GetProcessIDs('TM.exe',PIDlistTemp);<br> &nbsp;PIDList.Add(PIDlistTemp.Text);<br> &nbsp;PIDlistTemp.Free;<br> &nbsp;for i:=PIDList.Count-1 downto 0 do<br> &nbsp;begin<br> &nbsp; &nbsp;if(not IsNum(PIDList.Strings))then<br> &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp;PIDList.Delete(i);<br> &nbsp; &nbsp;end; &nbsp;<br> &nbsp;end;<br> &nbsp;for i:=0 to PIDList.Count-1 do<br> &nbsp;begin<br> &nbsp; &nbsp;find:=False;<br> &nbsp; &nbsp;Phd:=OpenProcess(PROCESS_VM_READ + PROCESS_QUERY_INFORMATION,<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; False,StrToInt(PIDList.Strings));<br> &nbsp; &nbsp;if(Phd&gt;0)then<br> &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp;GetSystemInfo(Sys_Info);<br> &nbsp; &nbsp; &nbsp;bAddr:=DWORD(Sys_Info.lpMinimumApplicationAddress);<br> &nbsp; &nbsp; &nbsp;while(not find)and(VirtualQueryEx(Phd,Pointer(bAddr),MemInfo,SizeOf(MemInfo))&lt;&gt;0)do<br> &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp; &nbsp;if(MemInfo.Type_9=MEM_PRIVATE)and(MemInfo.AllocationProtect=PAGE_READWRITE)then<br> &nbsp; &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SetLength(MyChars,MemInfo.RegionSize);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(ReadProcessMemory(Phd,Pointer(bAddr),@MyChars,MemInfo.RegionSize,n))<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;and(n&gt;0)then<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PInfo:=Trim(string(MyChars));<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;position:=Pos('/MsgEx.db',PInfo);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while(not find)and(position&gt;5)do &nbsp;//1<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Delete(PInfo,1,position-12);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(position&gt;5)then &nbsp;//2<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(PInfo[position-1] in ['0'..'9'])then &nbsp; //3<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dec(position);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QQnum:='';<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while(PInfo[position] in ['0'..'9'])do &nbsp; &nbsp;//4<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;QQnum:=QQnum+PInfo[position];<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Dec(position);<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end; //4<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;find:=True;<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;//3<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;//2<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;//1<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;<br> &nbsp; &nbsp; &nbsp; &nbsp;end;<br> &nbsp; &nbsp; &nbsp; &nbsp;bAddr:=bAddr+MemInfo.RegionSize;<br> &nbsp; &nbsp; &nbsp;end;<br> &nbsp; &nbsp; &nbsp;CloseHandle(Phd);<br> &nbsp; &nbsp; &nbsp;if(QQnum='')then QQnum:='0';<br> &nbsp; &nbsp; &nbsp;NumList.Add(QQnum);<br> &nbsp; &nbsp;end;<br> &nbsp;end;<br>end;<br><br>procedure TForm1.ListDblClick(Sender: TObject);<br>begin<br> &nbsp;EndOneProcess(StrToInt(List.Selected.SubItems[0]));<br>end;<br><br>procedure TForm1.btn1Click(Sender: TObject);<br>var<br> &nbsp;NL,PIDL: TStringList;<br> &nbsp;i: Integer;<br>begin<br> &nbsp;NL:=TStringList.Create;<br> &nbsp;PIDL:=TStringList.Create;<br> &nbsp;GetInfoFromProcess(NL,PIDL);<br> &nbsp;List.Clear;<br> &nbsp;for i:=0 to PIDL.Count-1 do<br> &nbsp;begin<br> &nbsp; &nbsp;with List.Items.Add do<br> &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp;Caption:=NL.Strings;<br> &nbsp; &nbsp; &nbsp;SubItems.Add(PIDL.Strings);<br> &nbsp; &nbsp;end;<br> &nbsp;end;<br> &nbsp;NL.Free;<br> &nbsp;PIDL.Free;<br>end;<br><br>end.<br>/////////////////////////////////////////////////<br>unit UnitEndQQ;<br><br>interface<br><br>uses<br> &nbsp;Windows, Classes, SysUtils, TLHelp32;<br><br>procedure EndOneProcess(PID: Cardinal); &nbsp; &nbsp;//需要uses TLHelp32;<br>procedure EndProcess(AFileName: string); &nbsp; &nbsp;//需要uses TLHelp32;<br>procedure EnumProcess(AFileName: string; var Num: Integer);<br>procedure GetProcessIDs(AFileName: string; var IDs: TStringList);<br><br>implementation<br><br>const<br> &nbsp;PROCESS_TERMINATE = $0001;<br><br>procedure EndOneProcess(PID: Cardinal); &nbsp; &nbsp;//需要uses TLHelp32;<br>begin<br> &nbsp;TerminateProcess(OpenProcess(PROCESS_TERMINATE, BOOL(0), PID), 0);<br>end;<br><br>procedure EndProcess(AFileName: string); &nbsp; &nbsp;//需要uses TLHelp32;<br>var<br> &nbsp;ContinueLoop: BOOL;<br> &nbsp;FSnapShotHandle: THandle;<br> &nbsp;FProcessEntry32: TProcessEntry32;<br>begin<br> &nbsp;FSnapShotHandle:=CreateToolhelp32SnapShot(TH32CS_SNAPPROCESS, 0);<br> &nbsp;FProcessEntry32.dwSize:=SizeOf(FProcessEntry32);<br> &nbsp;ContinueLoop:=Process32First(FSnapshotHandle, FProcessEntry32);<br> &nbsp;while ContinueLoop do<br> &nbsp;begin<br> &nbsp; &nbsp;if((UpperCase(ExtractFileName(FProcessEntry32.szExeFile))=UpperCase(AFileName))<br> &nbsp; &nbsp;or(UpperCase(FProcessEntry32.szExeFile)=UpperCase(AFileName)))then<br> &nbsp; &nbsp; &nbsp;TerminateProcess(OpenProcess(PROCESS_TERMINATE, BOOL(0), FProcessEntry32.th32ProcessID), 0);<br> &nbsp; &nbsp;ContinueLoop:=Process32Next(FSnapshotHandle, FProcessEntry32);<br> &nbsp;end;<br>end;<br><br>procedure EnumProcess(AFileName: string; var Num: Integer);<br>var<br> &nbsp;ContinueLoop: BOOL;<br> &nbsp;FSnapShotHandle: THandle;<br> &nbsp;FProcessEntry32: TProcessEntry32;<br>begin<br> &nbsp;FSnapShotHandle:=CreateToolhelp32SnapShot(TH32CS_SNAPPROCESS, 0);<br> &nbsp;FProcessEntry32.dwSize:=SizeOf(FProcessEntry32);<br> &nbsp;ContinueLoop:=Process32First(FSnapshotHandle, FProcessEntry32);<br> &nbsp;Num:=0;<br> &nbsp;while ContinueLoop do<br> &nbsp;begin<br> &nbsp; &nbsp;if((UpperCase(ExtractFileName(FProcessEntry32.szExeFile))=UpperCase(AFileName))<br> &nbsp; &nbsp;or(UpperCase(FProcessEntry32.szExeFile)=UpperCase(AFileName)))then<br> &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp;Inc(Num);<br> &nbsp; &nbsp;end;<br> &nbsp; &nbsp;ContinueLoop:=Process32Next(FSnapshotHandle, FProcessEntry32);<br> &nbsp;end;<br>end;<br><br>procedure GetProcessIDs(AFileName: string; var IDs: TStringList);<br>var<br> &nbsp;ContinueLoop: BOOL;<br> &nbsp;FSnapShotHandle: THandle;<br> &nbsp;FProcessEntry32: TProcessEntry32;<br>begin<br> &nbsp;if IDs=nil then Exit;<br> &nbsp;IDs.Clear;<br> &nbsp;FSnapShotHandle:=CreateToolhelp32SnapShot(TH32CS_SNAPPROCESS, 0);<br> &nbsp;FProcessEntry32.dwSize:=SizeOf(FProcessEntry32);<br> &nbsp;ContinueLoop:=Process32First(FSnapshotHandle, FProcessEntry32);<br> &nbsp;while ContinueLoop do<br> &nbsp;begin<br> &nbsp; &nbsp;if((UpperCase(ExtractFileName(FProcessEntry32.szExeFile))=UpperCase(AFileName))<br> &nbsp; &nbsp;or(UpperCase(FProcessEntry32.szExeFile)=UpperCase(AFileName)))then<br> &nbsp; &nbsp; &nbsp;IDs.Add(IntToStr(FProcessEntry32.th32ProcessID));<br> &nbsp; &nbsp;ContinueLoop:=Process32Next(FSnapshotHandle, FProcessEntry32);<br> &nbsp;end;<br>end;<br><br>end.
 
form信息:<br>======================<br>object Form1: TForm1<br> &nbsp;Left = 192<br> &nbsp;Top = 142<br> &nbsp;Width = 414<br> &nbsp;Height = 480<br> &nbsp;Caption = 'Form1'<br> &nbsp;Color = clBtnFace<br> &nbsp;Font.Charset = DEFAULT_CHARSET<br> &nbsp;Font.Color = clWindowText<br> &nbsp;Font.Height = -11<br> &nbsp;Font.Name = 'MS Sans Serif'<br> &nbsp;Font.Style = []<br> &nbsp;OldCreateOrder = False<br> &nbsp;PixelsPerInch = 96<br> &nbsp;TextHeight = 13<br> &nbsp;object List: TListView<br> &nbsp; &nbsp;Left = 0<br> &nbsp; &nbsp;Top = 0<br> &nbsp; &nbsp;Width = 273<br> &nbsp; &nbsp;Height = 433<br> &nbsp; &nbsp;Checkboxes = True<br> &nbsp; &nbsp;Columns = &lt;<br> &nbsp; &nbsp; &nbsp;item<br> &nbsp; &nbsp; &nbsp; &nbsp;Caption = 'QQ号码'<br> &nbsp; &nbsp; &nbsp; &nbsp;Width = 110<br> &nbsp; &nbsp; &nbsp;end<br> &nbsp; &nbsp; &nbsp;item<br> &nbsp; &nbsp; &nbsp; &nbsp;Caption = 'PID'<br> &nbsp; &nbsp; &nbsp; &nbsp;Width = 120<br> &nbsp; &nbsp; &nbsp;end&gt;<br> &nbsp; &nbsp;ColumnClick = False<br> &nbsp; &nbsp;DragMode = dmAutomatic<br> &nbsp; &nbsp;Font.Charset = GB2312_CHARSET<br> &nbsp; &nbsp;Font.Color = clWindowText<br> &nbsp; &nbsp;Font.Height = -12<br> &nbsp; &nbsp;Font.Name = '宋体'<br> &nbsp; &nbsp;Font.Style = []<br> &nbsp; &nbsp;FlatScrollBars = True<br> &nbsp; &nbsp;GridLines = True<br> &nbsp; &nbsp;ReadOnly = True<br> &nbsp; &nbsp;RowSelect = True<br> &nbsp; &nbsp;ParentFont = False<br> &nbsp; &nbsp;TabOrder = 0<br> &nbsp; &nbsp;ViewStyle = vsReport<br> &nbsp; &nbsp;OnDblClick = ListDblClick<br> &nbsp;end<br> &nbsp;object btn1: TButton<br> &nbsp; &nbsp;Left = 312<br> &nbsp; &nbsp;Top = 56<br> &nbsp; &nbsp;Width = 75<br> &nbsp; &nbsp;Height = 25<br> &nbsp; &nbsp;Caption = 'refresh'<br> &nbsp; &nbsp;TabOrder = 1<br> &nbsp; &nbsp;OnClick = btn1Click<br> &nbsp;end<br>end
 
这个也不取QQ号码,只是查找到有几个QQ在登陆,还有QQ的ID,<br><br>不需要用这么长的代码去得到这些内容
 
我可以明确地告诉你,这个方法能够得到QQ号。易语言代码能够通过编译运行得到当前运行中的QQ号!
 
兄弟你一定不知道我安装的是什么版本,qq2006beta1.exe &nbsp;XP SP2<br><br>你上面的代码已编译通过,得到的结果是 &nbsp; 第一个号码 0 &nbsp;<br><br>我没有第二个号码所以没看到
 
关注这个问题,但我不会,知道的告诉我啊
 
看一看进程方面的书,应该没有问题,不用翻译,自己写一个。<br>因为我不用QQ,所以无法写。<br>思路:<br>1、用PSAPI.dll遍历进程,找到进程;<br>2、找到QQ号码的窗口句柄(FindWindowsEx)。取值。(用SPY查看QQ号码的窗口句柄及其窗口深度)<br><br>最多不超过20行代码。
 
方法倒是不难,主要是QQ版本众多,还有很多人使用珊蝴虫,这些窗口句柄都不一样,<br><br>所以我很怀疑能否实现,<br><br><br>现在我使用的2006好办,QQ号码直接用SPY就可以看到.其它版本的QQ则不然<br><br>以前2004或2005的都不会显示<br><br>所以楼主很难实现获得所有的QQ号码.
 
我只是找人帮忙翻译,没叫你们评论这个代码能不能实现相应的功能!<br>我之所以愿意出高分,就是因为我知道代码能够实现相应功能!
 
不相信前面那段易语言程序能实现的人,留下你们的Email,我给你们发它的执行程序!眼见为实
 
cgcpj@tom.com
 
to sundata:<br>发给你了。
 
我觉得你这个不能取到qq号,这个东西我前几天做过了,我是用的其他方法实现的,我也很怀疑你这个能不能抓到2006版本的qq,如果可以,你把代码编译后的程序发给我试试<br>email : andd_chen@126.com
 
to andd_chen:<br>发给你了。
 
不知道你是要只取一次还是要跟踪聊天记录,如果是跟踪聊天,这个方法可能不行,如果要看当前有哪些号码在用,这个在2006版本前应该可以(我家的是2005)
 
我很怀疑这段代码能不能找到qq窗口,前两天有人聊天,中了qq尾巴,我不小心点了下,也中了,但是我的qq并不发消息,今天没事,拿那个尾巴研究了下,其实是盗传奇号的个马而已,它查找qq的方式就是通过窗口来的,但是qq2006版的这种方法好像是失效了
 
请你们看清楚问题!
 
顶一下,希望有人看到!再来帮忙!
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
747
import
I
I
回复
0
查看
796
import
I
后退
顶部