4. Designing and Writing OpenROAD Server Applications : How You Can Drive the OpenROAD Server from a Client : COM (Non-OpenROAD) Client Remote Server Object : CallProc Method
 
Share this page                  
CallProc Method
The CallProc method allows the client to call a specified 4GL procedure within the Initiated application, passing named parameters by value or by reference, using PDOs:
HRESULT CallProc
    (
        [in] BSTR ProcName,
        [in, optional] VARIANT * ByValDataObj,
        [in, optional] VARIANT * ByRefDataObj
    );
This method uses the following parameters:
ProcName
Contains the name of the 4GL procedure to be invoked
ByValDataObj
References a PDO containing parameter data to be passed as named parameters to the 4GL procedure. The data contained in the ByValDataObj is passed by value and cannot be modified by the 4GL procedure.
ByRefDataObj
References a PDO containing parameter data to be passed as named parameters to the 4GL procedure. The data contained in the ByRefDataObj is passed by reference and may be modified by the 4GL procedure. After the CallProc returns, the content of the ByRefDataObj can be examined (using the PDO methods described in OpenROAD Parameter Data COM Object (see OpenROAD Parameter Data COM Object)) to obtain the changed data.
If the call returns an error, the ByRefDataObj is not modified.
Both the ByValDataObj and ByRefDataObj references are optional. For the benefit of languages that cannot easily construct the standard “missing” VARIANT representation (that is, VT_ERROR, with V_ERROR = DISP_E_PARAMNOTFOUND), a VARIANT containing VT_NULL, or a NULL pointer to a VARIANT, are also interpreted as missing parameters.