ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Miscellaneous WINDEV functions
  • Start index of arrays sent to ActiveX or Automation objects
  • Passing the Automation arrays by value
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
AutomationParameter (Function)
In french: AutomationParamètre
Configures the management of accesses to the ActiveX objects and to the Automation objects.
Example
// 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:
apArrayBaseIndexSets the start index of arrays sent to ActiveX or Automation objects.
Possible values for <New value>: 0 or 1
apArrayByValueForces the arrays sent to ActiveX or Automation objects to be passed by value.
Possible values for <New value>: True or False.
apBinaryStringRetrieves 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)
Component: wd290ole.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/21/2023

Send a report | Local help