在win98中
Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Declare Function GetCurrentProcessId Lib "kernel32" Alias "GetCurrentProcessId" () As Long
接下来:在程序开启时(最好在模块的sub main() 中)
RegisterServiceProcess GetCurrentProcessId, 1