WINDOWS SERVICES 
Author Message
 WINDOWS SERVICES

You can use the following API:

'START PASTE
Const SimpleService = 1
Const NormalProcess = 0
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
Sub TransformToService()
    Dim pid As Long, reserv As Long
    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, SimpleService)
End Sub
Sub TransformToNormalProcess()
    Dim pid As Long, reserv As Long
    pid = GetCurrentProcessId()
    regserv = RegisterServiceProcess(pid, NormalProcess)
End Sub
'STOP PASTE

--
With best regards
Trimbitas Sorin
--
http://www.*-*-*.com/
--
| hello, does someone has any code on how to create a windows service?
|
|



Tue, 27 Dec 2005 04:55:28 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Service description for Windows Service

2. Windows Service in VB.NET - Failed to process service command

3. Launch Windows form, from a Windows Service Application

4. installing web app with windows service and windows aplication at same time

5. Installing windows service in Windows 98,ME

6. Invoking Windows Services property window from VB/VC++

7. Invoking Windows Services property window from VB/VC++

8. Notifyicon in Windows service

9. Windows Services

10. Window Service upgrade to VB.Net 2003

11. Good reference/resource for building Windows Services??

12. Change account of already installed Windows Service

 

 
Powered by phpBB® Forum Software