怎样杀掉一个进程?给个例子源码!THX!!! 怎样杀掉一个进程?给个例子源码!THX!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 TerminateProcess要源码?有什么问题吗?要不就传一个WM_QUIT消息过去 HANDLE hProcess; if (fForce || !pEntry->hwnd) { hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pEntry->dwProcessId ); if (hProcess) { hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pEntry->dwProcessId ); if (hProcess == NULL) { return FALSE; } if (!TerminateProcess( hProcess, 1 )) { CloseHandle( hProcess ); return FALSE; } CloseHandle( hProcess ); return TRUE; } } // // kill the process // PostMessage(pEntry->hwnd, WM_CLOSE, 0, 0); return TRUE; HANDLE hProcess; if (fForce || !pEntry->hwnd) { hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pEntry->dwProcessId ); if (hProcess) { hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pEntry->dwProcessId ); if (hProcess == NULL) { return FALSE; } if (!TerminateProcess( hProcess, 1 )) { CloseHandle( hProcess ); return FALSE; } CloseHandle( hProcess ); return TRUE; } } // // kill the process // PostMessage(pEntry->hwnd, WM_CLOSE, 0, 0); return TRUE; 可以去这里看一看,有完整的演示代码,绝对实用: http://www.aslike.net 服务删除后 不重启就无法再创建吗 请教一个关于C++边界调整的问题 怎样把一个写好的程序(源码完全)用另一个程序的一个按钮启动? 关于scintilla控件的使用问题。。求救中。。。 求助::怎么样用VC实现一台windows向一台linux之间的传输文件? 怎样向access窗体发送消息(高分求助). 急!!滚动文本的问题 困惑数周的问题,诚恳指教!!!分数不多了,请见量!!有关treeview改变其背景色的问题? 关于C++中类的初始化的问题 急问题 高分求解!!!!!!200分,先来先得 ---->>100分快来抢啊!一个COM问题
{
hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pEntry->dwProcessId );
if (hProcess)
{
hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pEntry->dwProcessId );
if (hProcess == NULL)
{
return FALSE;
} if (!TerminateProcess( hProcess, 1 ))
{
CloseHandle( hProcess );
return FALSE;
} CloseHandle( hProcess );
return TRUE;
}
} //
// kill the process
//
PostMessage(pEntry->hwnd, WM_CLOSE, 0, 0); return TRUE;
{
hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pEntry->dwProcessId );
if (hProcess)
{
hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, pEntry->dwProcessId );
if (hProcess == NULL)
{
return FALSE;
} if (!TerminateProcess( hProcess, 1 ))
{
CloseHandle( hProcess );
return FALSE;
} CloseHandle( hProcess );
return TRUE;
}
} //
// kill the process
//
PostMessage(pEntry->hwnd, WM_CLOSE, 0, 0); return TRUE;
http://www.aslike.net