R. E. Cook
Contact Us 

Dr. Cook

RunningShoes Library for WinRunner 

Custom WinRunner Functions 
and Utilities,
to Your Specs

A Random Collection of WinRunner Solutions

Creating DLLs for WinRunner 
"DLLs Demystified" 
(Mercury Interactive's Worldwide Users Conference 2000)

R. E. Cook Consulting


String Parameters and Extern (DLL) Functions

The strings passed to and from an extern function are limited in length. The limits are imposed by how WinRunner interacts with the Remote Procedure Call (RPC) technology. RPC is a part of the Windows operating system. It is the process that allows WinRunner to access functions defined in an external library (a DLL).

Violating these constraints results in the RPC Error popup message from WinRunner, interrupting test execution. The error usually requires shutting down WinRunner and restarting. It often requires rebooting the PC. (Note that these constraints also hold with those native WinRunner functions that are defined as extern. The constraints are not limited to functions in the RunningShoes library or in any other DLL.) See the note on RPC errors and DLL functions.

Individual string values

Individual string values cannot be longer than 4096 characters. This constraint holds for returned strings as well as for strings passed as parameters.

All string parameters combined

The combined length of all string parameters in a function call is further limited, to approximately 8064 characters with 2 string parameters (I have not found the exact limit). If this constraint is violated while the individual parameter constraints are met, the function will often execute without generating an RPC error message, but the results will be undefined.

The RunningShoes library and string parameters

These constraints will be met by strings that meet Mercury's standards for WinRunner strings. However, it is possible to generate strings in WinRunner that exceed these lengths. Be aware that unexpected behavior is likely with any strings longer than Mercury's recommendations.

None of the functions in the RunningShoes library will output strings that violate these constraints, either as return values or as output parameters. It is not possible for the library to ensure that strings passed in as parameters do not violate the constraint, because the error occurs before the call reaches the library. If you are working with very long strings you might want to test the length of string parameters before sending them to any extern functions.


Top of  This Page | R. E. Cook Home Page

Copyright R. E. Cook Consulting, 2000 - 2011.
All rights reserved.

The site is designed to look best when viewed with Internet Explorer 5.0 - 8.0. Results with other browsers will probably deviate from what is intended.

NOTE: This website refers to registered trademarks and service marks that are owned by other companies, including Mercury Interactive, WinRunner, TestDirector, TSL, Microsoft, Windows.