use
BOOL TerminateProcess( HANDLE hProcess, // handle to the process
UINT uExitCode // exit code for the process
);
or
VOID ExitProcess( UINT uExitCode // exit code for all threads
);
BOOL TerminateProcess( HANDLE hProcess, // handle to the process
UINT uExitCode // exit code for the process
);
or
VOID ExitProcess( UINT uExitCode // exit code for all threads
);
解决方案 »
- 将datagridview的数据转换成datata
- 关于图形放大的问题
- 今天终于穿上了4个裤衩了,不容易哦!高兴!散分!大家捧捧场!
- delphi与数据库 在线等 急急急!!!
- Timer的问题(或者是多线程的问题),解决得200分,合理建议100分,先给100
- 高分求教,如何取得Flash文件的原始长、宽????在线等候!
- 怎么将数据库中某个字段所有记录的长度减3?
- delphi7企业rip版正在下载,有人要吗?
- 程序同时运行两个FORM,FORM1的图片改变大小位置时,响应很慢,怎办?
- TO: taidy() ,我用你的办法动态生成了几个按钮,但是我怎样写代码响应这个按钮的Onclick事件呢
- 一个关于ADOQuery的排序问题
- 很有挑战性的问题,高手请进!!!
//强制终止某应用程序运行********************************************************
//==============================================================================
procedure AppForceExit(const AppName: string);
var lppe: TProcessEntry32;
ssHandle: THandle;
Wnd: HWND;
AppFound: Boolean;
begin
ssHandle := CreateToolHelp32SnapShot(TH32CS_SNAPALL, 0);
AppFound := Process32First(sshandle, lppe);
while AppFound do
begin
//其中lppe.szExefile就是程序名**********************************************
if UpperCase(ExtractFileName(lppe.szExeFile))=UpperCase(AppName) then
begin
Wnd := OpenProcess(PROCESS_ALL_ACCESS, true, lppe.th32ProcessID);
TerminateProcess(Wnd, 0);
end;
AppFound := Process32Next(ssHandle, lppe);
end;
end;