Incorrect return value for ProjectLegacy version of WaitForStrings2 in VT session

  • 7023030
  • 31-May-2018
  • 03-Jul-2018

Environment

Reflection Desktop (including Pro, or for UNIX and OpenVMS) 16.0 or higher
Reflection 2014
Reflection Pro 2014
Reflection for UNIX and OpenVMS 2014
Reflection for UNIX and OpenVMS 2011
Reflection Standard Suite 2011

Situation

An incorrect return value for the ProjectLegacy version of WaitForStrings2 will display in a Reflection Desktop VT session.  The WaitForStrings call (also known as WaitForStrings2 in ProjectLegacy of  Reflection Desktop) accepts a string array as an argument, and is supposed to return which element of the array was matched, or 0 if the timeout occurred before anything matching was received.  In Reflection Desktop's "ProjectLegacy" the WaitForStrings2 call does not return the item number in the array, instead, it returns the (index + 1) of the array, which is incorrect because the item number (count) is not just the index + 1.


Resolution

If using Reflection Desktop 16.0:
        Upgrade to Reflection Desktop 16.0 SP1 HF16 or higher  (16.0.446)
If using Reflection Desktop 16.1:
        Upgrade to Reflection Desktop 16.1 SP1 or higher

In Reflection Desktop, the WaitForStrings API actually returns the index of the element that was matched + 1, while in legacy Reflection version 14, it returns the matched element's offset from the lower bound + 1.  Using an array with a lower bound of 5 and elements at 5, 6 and 7, Reflection Desktop will return 8 and legacy Reflection version 14 will return 3.  The user still needs to change API WaitForStrings to WaitForStrings2 for migrated legacy sessions to allow the macros to function.

A HotFix (HF) for Reflection Desktop is a cumulatively built product update, intended for limited distribution, which addresses specific customer issues and enhancement requests; outside the regular Development release cycle. It is only available to Micro Focus customers with current software support and maintenance contracts, and only after contacting Micro Focus Customer Support directly.  A HotFix undergoes limited stability and quality testing and is intended for quick release to address specific product issues and should not be deployed to production environments without thorough testing.  It is recommended to upgrade to a full-release or a Service Pack version of Reflection Desktop when it becomes available.