Q
qbtxx
Unregistered / Unconfirmed
GUEST, unregistred user!
最好保存的格式像如下这样的:
--------------------------
排序 1. xxx.exe 1.xxx.dll
2. xxx.exe 2.xxx.dll
3. xxx.exe 3.xxx.dll
..... ......
最好还能有保存记录电脑现在调用的所有DLL信息~!
要是只能保存EXE信息的也可以~急!
--------------------------
谁帮我改一改~???如下保存不了进程
unit jckz;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,tlhelp32, StdCtrls,StrUtils;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
found: Bool;
ProcessListHandle: THandle;
ProcessStruct: TProcessEntry32;
creeper:TextFile;
Filename:string;
ik:Integer;
begin
ProcessListHandle := CreateToolHelp32Snapshot(TH32CS_SNAPPROCESS, 0);
ProcessStruct.dwSize := Sizeof(ProcessStruct);
found := Process32First(ProcessListHandle, ProcessStruct);
Memo1.clear;
while found do
begin
Memo1.Lines.Add(ProcessStruct.szExeFile);
Filename:=ExtractFilePath(Application.ExeName);
AssignFile(Creeper, Filename+'Erosxp.txt');
for ik:=0 to ComponentCount-1 do
Rewrite(creeper);
Writeln(creeper,ProcessStruct.szExeFile);
CloseFile(Creeper);
found := Process32Next(ProcessListHandle, ProcessStruct);
end;
CloseHandle(ProcessListHandle);
end;
end.
--------------------------
排序 1. xxx.exe 1.xxx.dll
2. xxx.exe 2.xxx.dll
3. xxx.exe 3.xxx.dll
..... ......
最好还能有保存记录电脑现在调用的所有DLL信息~!
要是只能保存EXE信息的也可以~急!
--------------------------
谁帮我改一改~???如下保存不了进程
unit jckz;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,tlhelp32, StdCtrls,StrUtils;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
found: Bool;
ProcessListHandle: THandle;
ProcessStruct: TProcessEntry32;
creeper:TextFile;
Filename:string;
ik:Integer;
begin
ProcessListHandle := CreateToolHelp32Snapshot(TH32CS_SNAPPROCESS, 0);
ProcessStruct.dwSize := Sizeof(ProcessStruct);
found := Process32First(ProcessListHandle, ProcessStruct);
Memo1.clear;
while found do
begin
Memo1.Lines.Add(ProcessStruct.szExeFile);
Filename:=ExtractFilePath(Application.ExeName);
AssignFile(Creeper, Filename+'Erosxp.txt');
for ik:=0 to ComponentCount-1 do
Rewrite(creeper);
Writeln(creeper,ProcessStruct.szExeFile);
CloseFile(Creeper);
found := Process32Next(ProcessListHandle, ProcessStruct);
end;
CloseHandle(ProcessListHandle);
end;
end.