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
【说明】转载请标明出处,谢谢
反馈文章质量,你可以通过快速通道评论:
查看全文
相关阅读:
R语言使用RMySQL连接及读写Mysql数据库
sparkR介绍及安装
信息熵的计算
django学习-管理界面、视图
django学习-数据库操作接口API--(CRUD)
django学习-数据库配置-创建模型
django学习-安装、创建应用、编写视图
接口八问 & 接口测试质量评估标准
robotframework-post request请求携带上一个请求返回的cookie
pipenv安装包时一直卡在Locking [packages] dependencies…,换pypi源
原文地址:https://www.cnblogs.com/virusswb/p/1245348.html
最新文章
Google三驾马车
「中国移动互联网测试大会」议题征集开始啦!
[ZZ]Android UI Automated Testing
给Testerhome测试小道消息做个硬广告
Sublime Text 汉化 中文
Sublime Text 查找的内容 高亮显示
Python 将省、市 json 替换 成拼音
Sublime Ctrl+B 编译输出乱码
Python 网络编程 netaddr
Oracle 删除唯一约束
热门文章
.Net Core 中 MemoryCache 使用
.Net Core EF 日志打印 SQL 语句
.Net Core NLog 配置
Asp.Net Core 使用X.PagedList.Mvc.Core分页 & 搜索
R语言-merge和rbind
r 随机数
R语言中的横向数据合并merge及纵向数据合并rbind的使用
R语言学习笔记:向量
R语言系列:生成数据
SPARKR,对RDD操作的介绍
Copyright © 2011-2022 走看看