background image
<< shows the command line string | Calling libc Functions >>
<< shows the command line string | Calling libc Functions >>

Using C Functions in Your Script

Creating Vuser Scripts
Chapter 4, page 52
Working with VuGen Enhancing Vuser Scripts
In
Using C Functions in Your Script
VuGen generates Vuser scripts in C. All standard C conventions apply to the
scripts, including control flow and syntax. You can add comments and conditional
statements to the script just as you do in other C programs. You declare and
define variables using regular C conventions.
The C Interpreter used by LoadRunner accepts the standard ANSI C language. It
does not support any Microsoft extensions to ANSI C.
Before you add any C functions to your script, note the following limitations:
A Vuser script cannot pass the address of one of its functions as a callback to a
library function
stdargs, longjmp and alloca are not supported.
No structure arguments or return types. (Pointer to structures are OK).
string literals are read-only. Any attempt to write to a string literal will generate an
access violation.