GDSX (Extended General Device Support) Manual
Service Routines
Extended General Device Support (GDSX) Manual—529931-001
8-38
GET_PROCESS_HANDLE_FROM_NAME_
STRING .BUFS; !String pointer
! Note that a string pointer will
! not work for the
! message pool (pool 1)
STRUCT .STRCT(SOME^STRUCT) = BUF; ! Point user structure to
! address returned.
.
.
TICKS := 300; ! Wait maximum of 3 seconds.
@BUF := GETLOCALPOOL(0, BUFSZ, TICKS); ! Get local buffer
! pool address
! (lower data stack).
IF @BUF = 0 THEN
BEGIN ! do error handling
END;
@BUFS := @BUF '<<' 1; ! Initialize string pointer.
.
GET_PROCESS_HANDLE_FROM_NAME_
This procedure returns the process handle of a process created by USCODE.
status returned value
INT:value
indicates the outcome of the call. The value of status is one of the following:
name:length input:input
STRING .EXT:ref:*, INT:value
supplies the name of the process whose process handle is to be found. The value
of name must be exactly the length in bytes as specified by length.
processhandle
output
INT .EXT:ref:10
is a pointer to a process handle. If the operation is successful, 0 is returned in
status, and processhandle contains the process handle corresponding to the
name supplied by name. If the operation is not successful, 1 is returned in
status, and processhandle contains a null process handle (-1 in each word).
status := GET_PROCESS_HANDLE_FROM_NAME_ ( name:length !
i:i
,processhandle ); ! o
-1 The process handle for name was not found
0 The process handle for name was found