T
tswhq
Unregistered / Unconfirmed
GUEST, unregistred user!
在Win98中需要结束大智慧软件的hypmain.exe
procedure TMyExplorer.KillProcess(ProcessName: string);//ProcessName为'hypmain.exe'
var
v_lppe :TProcessEntry32;
v_found :Boolean;
v_Hand,h:THandle;
a word;
begin
v_Hand := CreateToolhelp32Snapshot(TH32CS_SNAPALL,0);
v_lppe.dwSize:=Sizeof(v_lppe);
v_found := Process32First(v_Hand,v_lppe);
while v_found do
begin
if StrPas(v_lppe.szExeFile)=ProcessName then
begin
h:=OpenProcess(PROCESS_ALL_ACCESS,True,v_lppe.th32ProcessID);
GetExitCodeProcess(h,a);
TerminateProcess(h,a);
end;
v_found := Process32Next(v_Hand,v_lppe);
end;
end;
现在的问题是结束不了hypmain.exe这个进程
procedure TMyExplorer.KillProcess(ProcessName: string);//ProcessName为'hypmain.exe'
var
v_lppe :TProcessEntry32;
v_found :Boolean;
v_Hand,h:THandle;
a word;
begin
v_Hand := CreateToolhelp32Snapshot(TH32CS_SNAPALL,0);
v_lppe.dwSize:=Sizeof(v_lppe);
v_found := Process32First(v_Hand,v_lppe);
while v_found do
begin
if StrPas(v_lppe.szExeFile)=ProcessName then
begin
h:=OpenProcess(PROCESS_ALL_ACCESS,True,v_lppe.th32ProcessID);
GetExitCodeProcess(h,a);
TerminateProcess(h,a);
end;
v_found := Process32Next(v_Hand,v_lppe);
end;
end;
现在的问题是结束不了hypmain.exe这个进程