next up previous contents
Next: Define Create a Up: Process Support Subprograms Previous: Process Support Subprograms

Define Create a Subprocess

This Subprogram may be used to create a Subprocess (by Spawning it) and assigning a Viewport to it. Such a Subprocess may execute either a DCL Command Procedure or an Executable Image. The complete context of the parent process (Logical Name etc.) is available to the created Subprocess.

Short Name Calling Sequence

STATUS = UIDFPC(PRCNAM,COMAND[,VPRTID])

Long Name Calling Sequence

STATUS = UI_DEFINE_PROCESS (...) STATUS = UI_DEFINE_SUBPROCESS(...)

Input Arguments

PRCNAM (Character) Process Name COMAND (Character) DCL Command String VPRTID (Integer) Viewport ID (Optional)

Output Arguments

VPRTID (Integer) Viewport ID (Optional)

Function Value

UI__SUCCESS ) Success UISUCC )

UI__NOT_INITIALIZED ) Package not Initialized UININI )

UI__ILLEGAL_SYNTAX ) Illegal Process Name UIILSY ) Syntax

UI__DUPLICATE_PROCESS ) Duplicate Process UIDUPC ) Name

UI__NO_FREE_PROCESSES ) No Free Process UINOPC ) Slots available

UI__ILLEGAL_VIEWPORT ) Illegal Viewport ID UIILVP )

Note:

  1. A maximum of 16 Processes may be created. Subprocesses use the parent process quotas and therefore it is likely that quota limitations will prevent this number from being reached.
  2. The syntax for the Process Name is the same as for Verbs and Qualifiers. The Process Name may be up to 32 characters long, where only the first 8 are significant by default. This default may be modified using the UI_DEFINE_PROCESS_LENGTH Subprogram.
  3. Subsequent requests to communicate with the created process use the Process Name.
  4. The COMAND String should contain a valid DCL Command. Examples are:-

    $ Run MyDisk:[MyName]MyFile.Exe
    @MyDisk:[MyName]MyCommand.Com
    FORTRAN MyFile
    

    No guarantee is given that a Spawned Process will function correctly unless it either directly (via a ``Run" Command) or indirectly (via a DCL Command Procedure) executes a UIPACK based Application Program.

  5. The created process will be allocated a Viewport to act as its Input Viewport. The format of the call to this Subprogram determines whether this Viewport is allocated dynamically or statically. The VPRTID Argument determines what action is taken, where the syntax is:-
    VPRTID absent
    A Free Viewport is assigned to the created Process
    VPRTID -ve
    A Free Viewport is assigned to the created Process and the ID is returned to the Caller
    VPRTID +ve
    The specified Viewport is assigned to the created Process, creating it if necessary

    Unless a Viewport has been predefined, UIPACK allocates a quadrant of the screen to the Viewport assigned to each created process. These Viewports are invisible by default and are labelled by the Process Name.


next up previous contents
Next: Define Create a Up: Process Support Subprograms Previous: Process Support Subprograms



Liz Buckle
Fri Jan 13 17:46:53 CST 1995