'Hid your process frome CTRL+ALT+DEL
'by wgscd(自由奔腾)
'Date:2005/11/12
'but can not be run in NT system
'erro: DLL kernel32 cannot find RegisterServiceProcess enterpoint。and i search the kernel32.DLL
'in NT system path but can not find the RegisterServiceProcess function. so it is!
'so it just can run under Win9X .but i wiil find a way to let it run under the NT system .
'if you know now please contact with me!
'**************The code******************
Const RSP_SIMPLE_SERVICE = 1
Const RSP_UNREGISTER_SERVICE = 0
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Integer
'in vb.net you also can use System.Threading.Thread.CurrentThread et the CurrentThread
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Integer, ByVal dwType As Integer) As Integer
'Method RegisterMeService() is Register you APP thread in ServiceProcess
Private Sub RegisterMeService()
Dim pid, regserv As Integer
'Get the current process ID
pid = GetCurrentProcessId()
'Register as service
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
End Sub
'Method UnRegisterMeService() ok you Known
Private Sub UnRegisterMeService()
Dim pid As Integer, reserv As Integer
'Get the current process ID
pid = GetCurrentProcessId()
'Unregister as service
reserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
End Sub
'By the way,when i search the kernel32.DLL in NT system path i found another function named CreateProcessNotify
'so you can guess where it use ? i try to fing some information in Google and Baidu but i foung nothing !
'so i guess it's one of the MS unacknowledged function !if you know this function please tell me !
'QQ:153964481 e-Mail: wgscd@126.com
'God forgive my English !