⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 public_fun.pas

📁 代码包括了进程监视和键盘记录两方面的功能
💻 PAS
字号:
unit public_fun;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  ImgList, Menus, ShellApi, ExtCtrls, StdCtrls, Dialogs, TLHelp32, strutils, Buttons;

const
mymsg=wm_user+1;// WM_USER             = $0400;
iid=100;

//About proceeding define
type
TProcessInfo = Record
ExeFile : String;
ProcessID : DWORD;
end;
pProcessInfo = ^TProcessInfo;

function detecthread(str_thread:string):string;

implementation
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function detecthread(str_thread:string):string;
var p : pProcessInfo;
ContinueLoop:BOOL;
i:integer;
var
FSnapshotHandle:THandle;
FProcessEntry32:TProcessEntry32;
begin
 i:=0;
 FSnapshotHandle:=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
 FProcessEntry32.dwSize:=Sizeof(FProcessEntry32);
 ContinueLoop:=Process32First(FSnapshotHandle,FProcessEntry32);
 while integer(ContinueLoop)<>0 do
   begin
    New(p);
    p.ExeFile := FProcessEntry32.szExeFile;
    p.ProcessID := FProcessEntry32.th32ProcessID;
    if LowerCase(p.ExeFile)=LowerCase(str_thread) then i:=i+1;//proceeding is exist-->i=i+1
      ContinueLoop:=Process32Next(FSnapshotHandle,FProcessEntry32);
   end;

  if i<1 then//proceeding is not exist
    begin
      result:=('notexist');
    end
  else
    begin
      result:=('exist');    
    end;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -