GetRPCCallerProcess

GetRPCCallerProcess

%GetRPCCallerProcess function


Function

The function returns a unique identifier (HOBJ) of object of Process type that called currently executed RPC procedure.

Declaration

INT %GetRPCCallerProcess()

 

Parameters

No parameters.

Return value

The return value is of Int type. 

Description

This function can be used to identify the process in an application that is built on server-client architecture. It eliminates the explicit transmission of process identifier by means of parameters.
This example shows the transmission of identifier of calling process by means of parameter:

Example

; Calling with transmission of HOBJ of calling process INT _hbj _hbj := %GetParentProcessHBJ() CALL [E.Service] Service(1, _hbj)

 

 

 

 

; ***************************************** ; _callerProcess - HOBJ of calling process RPC PROCEDURE Service (IN INT _anyParams, IN INT _callerProcess) END Service

 

 

or using the function %GetRPCCallerProcess:

 

; Calling without transmission of HOBJ by means of parameter CALL [E.Service] Service(1)

 

 

 

 

; RPC PROCEDURE Service (IN INT _anyParams, IN INT _callerProcess) INT _callerProcess _callerProcess := %GetRPCCallerProcess() END Service