Ole4D Methods

OCGetLongProperty(p_Area;p_Propery;p_4DVar)


Used to retrieve the value of an Ole object property.
The property must be of type Long.
"p_Area" is the value of the variable associated with plug-in area, "p_Property" is the name of the OleObject property, and "p_4DVar" is the 4D variable to which will be assigned the value of the property.
This command cannot be used in 4D event handling methods, where you should use instead the OCGetLongOfSender command.
The p_4DVar variable must be of type Longint and already declared before calling this method.

Parameters

Parameter Type   Description
p_Area Longint ->

Plug-in area identifier.

p_Property String -> Name of the property to which you want to assign a value.
p_4DVar Longint <- Process or interprocess 4D variable to which will be assigned the value of the property.



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
This command is equivalent to the following sequence of code:
` creating a script host
$i:=OCCreaScriptHost ("ScriptHost")
` declaring the Ole object
$i:=OCDeclareObj ("ScriptHost";"OleObj1";Area1)
` declaring the 4D variable

C_LONGINT(LongVar)
` executing the VBScript code which transfers the value of the property to the 4D variable
$i:=OCRunScript ("ScriptHost";"SHost.SetLong "+Char(34)+"LongVar"+Char(34)+", OleObj1.LongProperty")