## Description

Include file: xprocess.h

### Overview

XProcess is the parent class for XApplication and XThread, you cannot create an instance of XProcess, you have to chose one the child classes. This classes should only be used if you need window-management.
XProcess and derived is killed automaticaly if you use windows and/or dialogs: it counts the opened dialogs and windows, if the last window/dialog is closed the thread/application is terminated. If you dont open dialogs or windows you need to terminate the application/thread yourself.

### Functions

#### QueryForQuit

#### Return-Value

BOOL canTerminate return TRUE if the process can be terminated, otherwise return FALSE. If you return FALSE a possible system shutdown is canceled.

#### Remarks

If the user try to close this prcess with the tasklist or a system shutdown is requested this function is called automaticaly. If you want to make a security-check (for example with XMessageBox), override this method.

#### Start

#### Remarks

After a process (XApplication/XThread) is constructed und you have setup your code, call Start() to make the process work.

#### Terminate

#### Remarks

Terminate a running process

#### Beep

#### Parameters

LONG frequency | frequency in hertz
LONG duration | duration in milliseconds

#### Remarks

Make some noise

#### ExecuteProg

#### Parameters

char * path | path/file to execute
char * args | arguments (can be NULL)
char * environment | enviroment for the program (can be NULL)
ULONG flags | flags (see DosExecPgm)
LONG * buffer | buffer for return-code of the program

#### Return-Value

LONG return-code from the system

#### Remarks

Executes a program

#### ScanEnvironment

#### Parameters

char * valueToSearch | the name of the value (eg. PATH)
XString * buffer | buffer to hold the data

#### Return-Value

BOOL success

#### Remarks

Scan a value from the environment ( SET-entry of the config.sys )

#### Sleep

#### Parameters

LONG duration time to sleep in milliseconds

#### Remarks

The current process is suspended for the given time

This document was generated by Jens von Pilgrim's Autodoc