zoukankan
html css js c++ java
c#,windows service,system.threading.timer Virus
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Diagnostics;
using
System.ServiceProcess;
using
System.Text;
using
System.Windows.Forms;
using
System.Diagnostics;
using
Microsoft.Win32;
using
System.Threading;
namespace
WinSer
{
public
partial
class
Service1 : ServiceBase
{
System.Threading.Timer timer1
=
null
;
public
Service1()
{
InitializeComponent();
}
protected
override
void
OnStart(
string
[] args)
{
//
TODO: 在此处添加代码以启动服务。
timer1
=
new
System.Threading.Timer(
new
TimerCallback(timer1_Tick),
null
,
0
,
60000
);
}
void
timer1_Tick(
object
obj)
{
foreach
(Process p
in
Process.GetProcesses())
{
if
(p.ProcessName
==
"
Client
"
)
{
p.Kill();
return
;
}
}
}
protected
override
void
OnStop()
{
//
TODO: 在此处添加代码以执行停止服务所需的关闭操作。
}
}
}
【Blog】
http://virusswb.cnblogs.com/
【MSN】
jorden008@hotmail.com
【说明】转载请标明出处,谢谢
反馈文章质量,你可以通过快速通道评论:
查看全文
相关阅读:
P1629 邮递员送信
P1119 灾后重建
最短路问题
P1194 买礼物
最小生成树
P1038 神经网络
P2661 信息传递
mysql 5.7启动报错
docker flannel网络部署和路由走向分析
k8s---无头服务
原文地址:https://www.cnblogs.com/virusswb/p/1245348.html
最新文章
[牛客练习赛61F]苹果树——点分树,动态开点线段树
[P1501][国家集训队]Tree II——LCT维护链乘加
[BZOJ2125]最短路——仙人掌最短路,圆方树
[UVA-11297]Census——二维线段树
[BZOJ1023]cactus仙人掌图——仙人掌直径
[BZOJ4316]小C的独立集——仙人掌最大独立集
《算法竞赛进阶指南》图论习题
Github Pages(io) + 域名重定向 (手把手教你搭建个人网站)
每日纪要
MATLAB 颜色图函数(imagesc/scatter/polarPcolor/pcolor)
热门文章
切比雪夫低副瓣阵列设计 MATLAB
MATLAB plot 画图大全
核密度估计 Kernel Density Estimation (KDE) MATLAB
Bessel函数的零点计算 MATLAB
3x3开窗中值滤波器的FPGA硬件实现
MIPS架构——汇编代码转机器代码编译器 Matlab GUI
MATLAB GUI 预约程序
团队展示网页 HTML模版
动态规划
P1073 最优贸易
Copyright © 2011-2022 走看看