HP LoadRunner Protocol SDK
Events TDL Example

Example of IDL

The following is an example of an interface definition that defines the event_logon and event_request events.

They are defined in the global functions interface LoadRunnerMyProtoEventInterface.

// FILENAME: myProtoEvents.idl
#include "Lrcidl.h"
[
    uuid (1B859586-E74C-4f4b-A79B-929B702EAFC6),
    version (1.0),
    helpstring ("LoadRunner: MyProto Event Type Library")
]
library LoadRunnerMyProtoEventApi
{
    [
        uuid (1F199E35-96E6-4130-810C-EDDFFAFFF8F2),
        api_global_functions
    ]
    interface LoadRunnerMyProtoEventInterface {

        // Event name is "event_logon"
        BOOL event_logon (
                 [in] LPCSTR username,
                 [in] LPCSTR password,
                 [in] long options
                 [out] int *session,
        );

        // Event name is "event_request"
        void event_request (
                 [in] int session,
                 [in] int requesttype,
                 [inout, size_is (buflen),
                      Lrc_size_is_offset (1)] BYTE *buffer,
                 [inout] long   buflen,
                 [out] long *result,
        );

    };
};

The GUIDs used for the LoadRunnerMyProtoEventApi library and LoadRunnerMyProtoEventInterface are unique identifiers generated by the Microsoft program, guidgen.exe.