//http://nowcan.yeah.net
#include windows.h
void __fastcall KillProcess(HWND hWnd)
{
DWord* pPid;
DWORD result;
void *hg;
hg = GlobalAlloc(GMEM_SHARE, sizeof(DWORD));
pPid =(DWORD *)GlobalLock(hg);
result = GetWindowThreadProcessId(hWnd, pPid);
if(result)
{
HANDLE ps = OpenProcess(1, false, *pPid);
TerminateProcess(ps, -9);
GlobalUnlock(hg);
GlobalFree(hg);
}
}
void __fastcall CloseDosWindow()
{
HWND hWnd=FindWindow("ConsoleWindowClas...[ 查看全文 ]