Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

%GetRPCCallerProcess function


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


Blok kódu
languageesl
themeConfluence
INT %GetRPCCallerProcess()
Parameters
No parameters.
Return value
The return value is of the 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


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


Blok kódu
languageesl
themeRDark
  ; *****************************************
 ; _callerProcess - HOBJ of calling process
 RPC PROCEDURE Service (IN INT _anyParams, IN INT _callerProcess)
 END Service
 
or using the function %GetRPCCallerProcess:
 


Blok kódu
languageesl
themeRDark
  ; Calling without transmission of HOBJ by means of parameter
 CALL [E.Service] Service(1)
 
 
 


Blok kódu
languageesl
themeRDark
  ;
 RPC PROCEDURE Service (IN INT _anyParams, IN INT _callerProcess)
   INT _callerProcess
   _callerProcess := %GetRPCCallerProcess()
  END Service