Share this page

# lrs_cleanup

Environment Functions

Terminates the use of the WinSock DLL.

    int lrs_cleanup( );

The lrs_cleanup function terminates the use of the Windows Sockets DLL, similar to WSACleanup and system resources, such as file descriptors, are freed. Check the return code to verify successful cleanup.

Typically, lrs_cleanup appears in the vuser_end section of the script. Note that not all WinSock applications call this function.

This function is recorded during a Windows Socket session.

## Return Values

Windows Sockets Return Values

## Parameterization

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

## Example

In the following example lrs_cleanup terminates the WinSock session.

Copy code

    int LR_FUNC vuser_end(LR_PARAM p) {
        int rc = lrs_cleanup();
        if (rc != 0)
            lr_output_message("Winsocket resources not freed. error %d", rc);
        return 0;
    }

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