Guardian Application Conversion Guide
Converting a Pascal Program to Run at a High PIN
Converting Pascal Applications
096047 Tandem Computers Incorporated 6–11
The PROCESSHANDLE_DECOMPOSE_ procedure requires a process handle as an
input parameter. If you do not know the process handle of your process, first call the
PROCESSHANDLE_GETMINE_ procedure. Then pass the result to
PROCESSHANDLE_DECOMPOSE_ , which returns the CPU and PIN values as
separate integer values. For example:
VAR my_phandle : ARRAY[1..10] OF INTEGER;
my_cpu, my_pin : INTEGER;
status : INTEGER;
{ Return my process handle. }
status := PROCESSHANDLE_GETMINE_(my_phandle);
IF status <> 0 THEN error_routine (status);
{ Return my CPU and PIN values. }
status := PROCESSHANDLE_DECOMPOSE_(my_phandle,
my_cpu,
my_pin);
IF status <> 0 THEN error_routine (status);
Your existing program might also call the MYPID procedure within another Guardian
procedure call (for example, in a SETMODE function 11, GETCRTPID, or
PROCESSINFO call). This example shows MYPID in a SETMODE (function 11)
procedure call:
status := SETMODE (file_number,
11,
MYPID, { Set to the CPU and PIN. }
0,
previous_owner);
For SETMODE function 11, you are not required to set the
parameter_1
value to the
CPU and PIN values. Instead, set
parameter_1
to any positive value:
status := SETMODE (file_number,
11,
1, { Set to any positive value. }
0,
previous_owner);