紧急~怎么调用WIN API函数中的RegisterviceProcess

来源:百度知道 编辑:UC知道 时间:2024/09/22 21:32:02
那位高手指点一下~QQ群20931497
调用WIN API函数中的RegisterviceProcess
是怎么搞的~~

只有Win98/WinME可以用,现在几乎不用这个了,在VB API Text Viewer中没有:
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessId As Long, ByVal dwType As Long) As Long

Private Const RSP_SIMPLE_SERVICE = 1
Private Const RSP_UNREGISTER_SERVICE = 0
例:
'假设知道进程ID
RegisterServiceProcess pid,RSP_SIMPLE_SERVICE
'注册为服务
RegisterServiceProcess pid,RSP_UNREGISTER_SERVICE
'卸载服务