主要是想隐藏、保护进程,google了一下,说写成dll文件,开机加载是最好的
google搜索的结果可以用VB6或VC++编写dll
我这个是保护自己的程序用的,不需要远程线程,想靠这个隐藏的dll保护自己的程序
10几年前在学校学过basic和fortran
现在想学VB6或VC++
谁帮忙提供一个dll标准格式,我只要修改里面的函数
函数作用:每隔5分钟检查某进程时候存在,不存在就shutdown -r -t 0
我侧重应该学习哪几条指令,才能最快地写出这个函数
不胜感谢
要用到的API。。。
Private Declare Function ProcessFirst Lib "kernel32" Alias "Process32First" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
Private Declare Function ProcessNext Lib "kernel32" Alias "Process32Next" (ByVal hSnapShot As Long, uProcess As PROCESSENTRY32) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Const TH32CS_SNAPPROCESS = &H2
Private Const TH32CS_SNAPheaplist = &H1
Private Const TH32CS_SNAPthread = &H4
Private Const TH32CS_SNAPmodule = &H8
Private Const TH32CS_SNAPall = TH32CS_SNAPPROCESS + TH32CS_SNAPheaplist + TH32CS_SNAPthread + TH32CS_SNAPmodule
Private Const MAX_PATH As Integer = 260
Private Const PROCESS_TERMINATE = &H1
Private Type PROCESSENTRY32
dwSize As Long
cntUsage As Long
th32ProcessID As Long
th32DefaultHeapID As Long
th32ModuleID As Long
cntThreads As Long
th32ParentProcessID As Long
pcPriClassBase As Long
dwFlags As Long
szExeFile As String * MAX_PATH
End Type
调用 shutdown -r -t 0 可以用VB的shell语句。。