Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 12:30:11 +0000



Post From: How access the binary from sc.MakeHTTPBinaryRequest()

[2023-02-15 04:56:08]
User305536 - Posts: 52
THE PROBLEM here is that I don't know how to access the binary data thats stored in the sc.HTTPBinaryResponse
Please help, I love Sierra Chart and am long time user, but there is literally zero documentation on a beautiful feature.
This sc.MakeHTTPBinaryRequest really scratches my itch, but accessing the binary data is killing me.
std::string outputfile1;
std::ofstream myfile1;
outputfile1 = "C:\\temp\\mytest.bin";

myfile1.open(outputfile1, std::ios::out | std::ios::trunc);
//now loop thru
for(int i = 1; i <= sc.HTTPBinaryResponse.GetArraySize(); i++)
{
  if (sc.HTTPBinaryResponse)
  {
    Msg.Format("INDEX IS: %i", i);
    sc.AddMessageToLog(Msg, 0);
    myfile1 << sc.HTTPBinaryResponse << std::endl;
  }
}

//myfile1 << "Start Debug logging..." << std::endl;
//myfile1 << (const char *) &sc.HTTPBinaryResponse;
myfile1.close();