|
|
|
|
- Start index of arrays sent to ActiveX or Automation objects
- Passing the Automation arrays by value
AutomationParameter (Function) In french: AutomationParamètre Configures the management of accesses to the ActiveX objects and to the Automation objects.
// Sets the start index of the Automation arrays AutomationParameter(apArrayBaseIndex, 1)
Syntax
<Result> = AutomationParameter(<Parameter to process> [, <New value>])
<Result>: Type of the requested parameter Current value of the parameter. If <New value> is specified, returns the value before modification. <Parameter to process>: Integer constant This parameter can correspond to: | | apArrayBaseIndex | Sets the start index of arrays sent to ActiveX or Automation objects. Possible values for <New value>: 0 or 1This constant corresponds to apArrayBaseSubscript in previous versions. | apArrayByValue | Forces the arrays sent to ActiveX or Automation objects to be passed by value. Possible values for <New value>: True or False. | apBinaryString | Retrieves the binary strings of OLE automation. Possible values for <New value>: True or False If the value is set to False (by default), the retrieval stops with the first binary 0. |
<New value>: Optional parameter, type of the parameter to modify Value that must be given to the parameter. Remarks Start index of arrays sent to ActiveX or Automation objects When using WLanguage arrays with ActiveX or Automation objects, WLanguage generates Automation arrays with indices starting at 0. Some ActiveX or Automation objects require arrays with indices starting at 1. To set the start index of Automation arrays, use the following line of code:
AutomationParameter(apArrayBaseIndex, 1)
Passing the Automation arrays by value WINDEV passes the WLanguage arrays by reference to the ActiveX or automation objects. Some ActiveX or Automation objects do not support the passage of arrays by reference. To force the arrays to be passed by value, the array must be enclosed in brackets during each call:
AutomationObject>>Method(5,(MyWLArray))
Instead of:
AutomationObject>>Method(5, MyWLArray)
To force all the arrays to be passed by value, all you have to do is use the following line of code:
AutomationParameter(apArrayByValue, True)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|