Ole4D Methods

OCGetLongParam(p_EventId;p_ParamN;p_4DVar)


Used to retrieve the value of an event parameter from within the 4D event handling method.
The parameter must be of type Longint.
"p_EventId" is the event id, "p_ParamN" is the number of parameter, and "p_4DVar" is the 4D variable that will receive the value of the parameter.
The numbering of the parameters starts from 0.
The event id is sent as a parameter to the 4D method that handles the event.
The "p_4DVar" variable must be a process or interprocess of type Longint, and already declared.

Parameters

Parameter Type   Description
p_EventId String ->

Event identifier.
This value is given as a first parameter to the 4D event handling method.

p_ParamN Integer -> Number of the parameter which value you want to retrieve, starting from 0.
p_4DVar Longint <- 4D process or interprocess variable of type Longint which has to be declared before executing this command.



Return Values
0 – The method call was successful.
If the method call was not successful the return value is not zero. For more information call OCLastError.

Example

C_Longint(LongVar)
$i:=OCGetLongParam($1;0;LongVar)


is equivalent to the following sequence of code:

C_Longint(LongVar)
$i:=OCRunScript ("ExampleHost";"inVariable = SHost.GetParam("+$1+",0)")

$i:=OCRunScript ("ExampleHost";"SHost.SetLong "+Char(34)+"LongVar"+Char(34)+", inVariable")

,which assigns to the "LongVar" 4D variable the value of the first parameter.
The "ExampleHost" script host must be already created.