modGlobal

modGlobal


Store all public variables, constants and common functions.


Public:

Constants:

NameDescription
 Error 
 INFINITE 
 OK 
 Service_Name 
 XMLPATH 

Types:

NameDescription
 Verbosity 

Properties:

NameDescription
 Config 
 hStopPendingEvent 
 intVerbosity 
 IsNTService 
 oPOP3 Object to handle POP3/STMP commands. 

Methods:

NameDescription
 GetWindowsVersion Get the Windows version installed.  
 Main Main function. 
 MsgWaitObj The MsgWaitObj function replaces Sleep, WaitForSingleObject, WaitForMultipleObjects functions.
Unlike these functions, it doesnt block thread messages processing.

  • Using instead Sleep:
    • MsgWaitObj dwMilliseconds
  • Using instead WaitForSingleObject:
    • retval = MsgWaitObj(dwMilliseconds, hObj, 1&)
  • Using instead WaitForMultipleObjects:
    • retval = MsgWaitObj(dwMilliseconds, hObj(0&), n),
    • where n - wait objects quantity,
    • hObj() - their handles array.
 
 WriteLog Write a pop2owa.log file with errors, warnings and log messages.  

Private:

Types:

NameDescription
 PROCESSENTRY32 

Methods:

NameDescription
 bIsEXE Evaluate if the process is running under IDE environment.  
 GetNextBlock Function to parse Command Line string.  
 KillProcess Kill the process that match with the name passed.  
 ParseCommandLine Function to parse de command line passed by the user.  

Declarations:

NameDescription
 CloseHandle (function) 
 CreateMutex (function) 
 CreateToolhelpSnapshot (function) 
 GetTickCount (function) 
 GetVersion (function) API to get the OS version 
 MsgWaitForMultipleObjects (function) Waits until one or all of the specified objects are in the signaled state or the time-out interval elapses
Windows API 
 OpenProcess (function) 
 ProcessFirst (function) 
 ProcessNext (function) 
 TerminateProcess (function)