Thing library

A thing is a general purpose extension of the system. These functions allow you to create, remove and enquire the existing things. These things can in general take a few specific forms, they can contain an entire application (executable thing), or utility code (extension thing), or something else (e.g. to store shared data structures, to create semaphores etc.)

Things have a free structure, and can thus be defined in any way you like. However, for extension things two standard formats are provided. The routines in the thing can be called using either the c calling conventions (fastest, but not very flexible), or using parameter blocks. Parameter blocks include a type definition of (some of) the parameters and are therefore more flexible.

Things are created using a definition block. Part of this definition block is the thing owner. When your thing is loaded as a resident extension, the thing owner has to be SYSTEM. Otherwise the thing will be removed when the job which loaded the resident extension is removed ! (The programs which load resident extensions should always load resident extensions in memory which is owned by the system).

Creation routines
THINGCreate
Create a new extension thing. This routine allows the programmer to define the name, version, sharability of the thing, and also a pointer list of routines and their extension name. The programmer is also able to supply routines which should be called when the thing is used, freed, force freed or removed. (This last feature is not yet supported in syslib - for future compatibility the pointers to the routines should be NULL).
THINGCreateBlock
Create a new exension thing. Similar to THINGCreate, except that the extension routines now get all their parameters in a parameter block (and not in the standard c method).
THINGCreateAny
Create a new general purpose thing. The actual format can be defined by the caller (and should be known by the users).
THINGAppend
Add some extensions to an already existing thing. The extensions use the c calling conventions.
THINGAppendBlock
Add some extensions to an already existing thing. The extensions use parameter blocks.
General manipulation and query
THINGRemove
Gentle removal of a thing. This only works if the thing is not in use.
THINGFree
Free a thing.
THINGFreeFor
Same as THINGFree, but release a thing which is used by another job.
THINGFreeFull
Full version of THINGFree, which can exploit all the possibilities which the OS provides.
THINGZap
Force remove a thing. This call will remove the thing and all jobs using that thing. This call may also remove the calling job, and is therefore not atomic.
THINGNext
Scan through the list of available things.
THINGUserNext
Scan through the users of a thing.
Usage routines
THINGUse
Use a thing.
THINGUseFor
Same as THINGUse, but the user job is also specified.
THINGUseFull
THINGUse which can exploits all the options the OS provides. This can be necessary to access some things.
THINGCall
Call a routine in an extension thing, c method of parameter passing.
THINGCallIn
Same as THINGCall, except that the thing should be used and freed explicitly.
THINGCallBlock
Call a routine in an extension thing, the parameters are passed as a parameter block.
THINGCallBlockIn
Same as THINGCallBlock, except that the thing should be used and freed explicitly.
THINGExec
Execute an executable thing. This function is similar to JOBLoad (cfr. job_h) except that the application code is not loaded but should be avialable as an executabe thing. An executable ting can be created by loading an application as a resident extension (thanks to the DLL Manager).

PROGS, Professional & Graphical Software
last edited January 10, 1996