The following public member functions are provided as part of the tpriProc class:
static int Create(int create = 0);
Attach the current process to a tpriProc class object.
static int Destroy();
Detach the current process from its tpriProc class object.
static int PrIni(int argc, char **argv);
Initialize the current process based on the command line and the default parameters read from the initialization file.
static int PrWait();
The next timer interval has expired.
An Activate for this process is requested.
A Resume for this process occurs.
static int Activate(char *appName);
Request the process manager to activate the specified process.
static int Resume(char *appName = NULL);
tatic int Resume(int startOrder);
static int Resume(HANDLE hResume);
Wake the specified process if it is currently sleeping.
static int Suspend(char *appName);
static int Suspend(int startOrder);
Suspend a process so that it does not awake from the next call to PrWait().
static int Deactivate(char *appName = NULL);
Request that the process manager to deactivate the specified process.
int countRunningProcs();
Return the number of currently running processes.
static HANDLE openResumeHandle(char *appName);
Open a handle to allow for fast resumes of another process.
static int closeResumeHandle(HANDLE hResume);
Close a resume handled opened with openResumeHandle(..).
static int getAppName(char *pBuf, unsigned int szBuf);
Export the application name of the current process to the supplied buffer.
static int getAppName(char *pBuf, unsigned int szBuf, int startOrder);
Export the application name of the current process to the supplied buffer.
static int getBinName(char *pBuf, unsigned int szBuf,char *appName = NULL);
Export the binary file name of the specified process to the supplied buffer.
static float getIntervalPct(char *appName = NULL);
Return the current value of the percent interval utilized for the specified process.
static float getIntervalPctMax(char *appName = NULL);
Return the current value of the maximum percent interval utilized for the specified process.
static int getDbgLevel(char *appName = NULL);
Return the debug level for the specified process.
static int setDbgLevel(char *appName, int dbglvl);
Set the debug level for the specified process.
static tpriProcGroup getProcGroup(char *appName = NULL);
Return the process group identifier for the specified process.
static DWORD getPid (char *appName = NULL);
Return the process ID for the specified process.
static int getRestart(char *appName = NULL);
Return the auto-restart flag for the specified process.
static int setRestart(char *appName, int restart);
Set the auto-restart flag for the specified process.
static long getRepRate(char *appName = NULL);
Return the periodic repetition rate for the specified process (ms).
static int getRunMode(char *appName = NULL);
Return the run mode (Win32, RTSS) for the specified process.
static tpriProcState getState(char *appName = NULL);
Return the current state for the specified process.
static inline tpriProcState getMgrState();
Return the current state of the process manager.
static int getStartOrder(char *appName = NULL);
Return the start order for the specified process.
static __int64 getStateTime64(char *appName = NULL);
Return the amount of time the specified process has been in its current state (100 ns increments).
static long getStateTime(char *appName = NULL);
Return the amount of time the specified process has been in its current state (1 second increments).
static const char *getStateDesc(tpriProcState state);
Return a description of the specified state.
static const char *getStateDesc(char *appName = NULL);
Return a description of the current state for the specified process.
static int exportProdef(prodef *pprodef, char *appName = NULL);
static int exportProdef(prodef *pprodef, int startOrder);
Export a copy of the entire process definition of the specified process.
static inline void setState(tpriProcState newState);
Set the state for the current process.
static void setDispStatus(const char *fmt, ...);
Set the display status string for the current process.
static int getDispStatus(char *pBuf, unsigned int szBuf, char *appName = NULL);
Export the current display status for the specified process.
static int clearErrorState(char *appName = NULL);
Clear the error state associated with the specified process.
static time_t time(time_t *timer);
Return the current time (seconds since 1/1/1970 12:00 am UTC).
static struct tm *lcltime(struct tm *ltm);
Return the current local time.
static void ftime(struct _timeb *timeptr);
Return the current time (seconds and milliseconds since 1/1/1970 12:00 am UTC).
static inline void setWDog(int wd);
Set the watchdog flag associated with the current process.