HP LoadRunner Protocol SDK
Define Error and Warning Messages

To add text messages for use in code:

  1. Edit ReplayApi/Resource Files/<protocol ID>.eng. Add a key and a message text for each message.

    The message text can include parameters. For example:

       Session opening failed. Last error %_1_ld.
       Failed to execute HTTP GET request. Last error "%1".
       Header "%1: %2" added.
    

    Parameter formats

  2. Include the header file <protocol ID>_res.h in ReplayApi/Source Files/<protocol ID>.cpp. For example,  #include "STV_res.h". This header file is created when the project is built.
  3. You can then output messages by calling methods of The CProtocolExtension Class. For example: CProtocolExtension::Instance()->LogNotifyMessage(STANDARD_LOG_LEVEL, MyProtocolID_DEMO_TEXT_RESOURCE, "param 1");