function GetProcessHandle(FHandle:THandle):Boolean;<br>var<br> FHWND:HWND;<br> Buffer : PChar;<br> iRead : DWORD;<br> FAddr : Cardinal;<br>begin<br> Result := False;<br> FHWND := GetWindow(FHandle,GW_HWNDFIRST); //获取起始窗口句柄<br> while FHWND > 0 do<br> begin<br> WindowThreadId := GetWindowThreadProcessId(FHWND,@ProcessID);//获取窗口线程ID和进程标识符<br> ProcessHandle := OpenProcess(PROCESS_ALL_ACCESS,True,ProcessID); //获取进程句柄<br> if ProcessHandle > 0 then<br> begin<br> FAddr := $004000000; //定义读取内存特征的基址<br> GetMem(Buffer,1024);<br> ReadProcessMemory(ProcessHandle,Pointer(FAddr),Buffer,SizeOf(Buffer),iRead); //读取内存特征<br> if Buffer='内存数据特征' then //判断内存特征<br> begin<br> Result := True;<br> Break;<br> end;<br> end;<br> FHWND := GetWindow(FHWND,GW_HWNDNEXT);<br> end;<br>end;<br><br>//ps:我个人比较BT…,不太喜欢传统的方法……