Share this page

# lrs_get_static_buffer

Example: lrs_get_static_buffer | Buffer Functions

Gets a static buffer or part of it.

    char *lrs_get_static_buffer( char *s_desc, char *buffer, int offset, int length, char *encoding );

s_desc | A descriptor identifying the socket.
buffer | A descriptor identifying a static buffer.
offset | The offset inside the buffer (binary representation of the data).
length | The length of the data to retrieve (binary representation of the data).Specify -1 to ignore the offset and retrieve the whole buffer.
encoding | The encoding method for the returned data. The possible values are "ascii" or "ebcdic". A NULL value indicates the original client format.

The lrs_get_static_buffer function retrieves a static buffer or part of the buffer from the data file. You specify the buffer as well as the offset and length of the data to retrieve. This buffer is returned after any parameter substitution.

After this function is executed, the retrieved buffer (or a part of it) is stored in an internal buffer (User Buffer) in the format specified by the encoding parameter. The return value is a pointer to the user buffer. If the encoding parameter is set to NULL, the user buffer is stored in the original client format (either ebcdic or ascii).

To retrieve the contents of the user buffer, use lrs_get_user_buffer. To determine its size, use lrs_get_user_buffer_size.

Note that the following functions overwrite the same internal buffer (user buffer):

- lrs_ascii_to_ebcdic

- lrs_ebcdic_to_ascii

- lrs_get_received_buffer

- lrs_get_static_buffer

- lrs_decimal_to_hex_string

In all of the above user buffer functions (except lrs_decimal_to_hex_string), use lrs_get_user_buffer_size to determine the actual buffer size before printing the buffer contents. Do not retrieve the entire buffer using a -1 as the length argument, and then try to print its contents. The reason for this is that VuGen may misinterpret the NULL characters within the buffer as a terminating string. Print functions include all the Message Functions such as lr_output_message.

This function is not recorded during a WinSock session; you manually insert it into your script.

## Return Values

Windows Sockets Return Values

## Parameterization

You cannot use standard parameterization for any arguments in this function.

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: