Now, add a new procedure to the form, called "MakeMeService
".
Add the following code to this procedure:
Dim pid As Long
Dim regserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_SIMPLE_SERVICE)
Add another procedure to the form, called "UnMakeMeService
". Add
the following code to this procedure:
Dim pid As Long
Dim regserv As Long
pid = GetCurrentProcessId()
regserv = RegisterServiceProcess(pid, RSP_UNREGISTER_SERVICE)
Comments