background image
<< Using C Functions in Your Script | Defining Parameters >>
<< Using C Functions in Your Script | Defining Parameters >>

Calling libc Functions

Working with VuGen · Enhancing Vuser Scripts
Creating Vuser Scripts
Chapter 4, page 53
Calling libc Functions
You can call libc functions, but since the interpreter used by LoadRunner does not
support any Microsoft extensions to ANSI C, you cannot use Microsoft's include
files.
You can either write your own prototypes when necessary, or ask Mercury
Customer Support to send you ANSI-compatible include files containing prototypes
for libc functions.
Linking Mode
The C interpreter used by LoadRunner uses a "lazy" linking mode in the sense that
a function need not be defined at the start of a run, as long as it is defined before
it is used. For example:
lr_load_dll("mydll.dll");
myfun(); /* defined in mydll.dll -- can be called directly,
immediately after myfun.dll is loaded. */