I am using QALoad's Winsock middleware to test a client/server desktop application. I have been able to variablize one section of a buffer that is sent to the server by using the sprintf command. An example follows:

sprintf(sendbuffer, "Buffer to be sent to server with variable using %s in place of hard coding.", variable1);

I need to variablize another section of the same buffer before it is sent to the server. I am unsure how properly to do this. Any help would be greatly appreciated.

Also, when creating variables for buffers after a script is converted, does memory have to be freed up at the end of the script? If so, what is the proper way to do this?