如何用C#实现隐藏进程
我要做一个局域网管理软件,防止客户端被关闭.
哪位大佬指导下,该怎么实现?
中国DONET论坛上有相关的文章,但运行时出现问题.
http://www.chinaaspx.com/Comm/Dotnetbbs/Showtopic.aspx?Forum_ID=6&Id=106156
using System.Runtime.InteropServices;
[DllImport("kernel32.dll")]
public static extern int RegisterServiceProcess(int dwProcessId, int dwType);
void Button1Click(object sender, System.EventArgs e)
{
RegisterServiceProcess(Convert.ToInt32(null),1);
}
void Button2Click(object sender, System.EventArgs e)
{
RegisterServiceProcess(Convert.ToInt32(null),0);
}
运行时出现下面错误:
Unable to find an entry point named 'RegisterServiceProcess' in DLL 'kernel32.dll'.