NTService

NTService


NT Service module.


Author: Original code from Sergey Merzlikin, modified by Carlos Garc�s

Public:

Methods:

NameDescription
 StartService Start the NT service of Pop2owa 

Private:

Properties:

NameDescription
 hServiceStatus 
 hStartEvent 
 hStopEvent 
 ServiceName 
 ServiceNamePtr 
 ServiceStatus 

Methods:

NameDescription
 FncPtr The FncPtr function returns function pointer.  
 Handler The Handler sub processes commands from Service Dispatcher. It sets event hStopEvent when processes command SERVICE_CONTROL_STOP or SERVICE_CONTROL_SHUTDOWN.  
 ServiceMain It initializes service, sets event hStartEvent, and waits hStopEvent event.
When hStopEvent fires, this sub exits and service stops. 
 ServiceThread The ServiceThread sub starts the service. This sub returns control only after service termination.  
 SetServiceState The SetServiceState sub changes service state. If parameter omitted, it confirms previous state.  

Declarations:

NameDescription
 CreateThread (function) 
 MessageBox (function)