Support Board
Date/Time: Tue, 08 Oct 2024 06:46:49 +0000
Post From: Control Bar Buttons Using Http Request Crashing Sierra Chart
[2022-10-03 07:06:17] |
User431178 - Posts: 511 |
Probably memory access violation when reading Headers, although I'm guessing slightly as the function is not documented. int MakeHTTPPOSTRequest(const SCString& URL, const SCString& POSTData, const n_ACSIL::s_HTTPHeader* Headers, int NumberOfHeaders); I'd expect the Headers parameter to be the address of an array of headers, which is why the NumberOfHeaders parameter is needed. In your code you pass the address of a single header, but you tell the function that there are 2 headers to read, when the second non-existant header is read an access violation can occur. Suggest setting NumberOfHeaders = 1 If you actually need 2 headers then const int numberOfHeaders = 2 n_ACSIL::s_HTTPHeader HTTPHeaders[numberOfHeaders]; HTTPHeaders[0].Name = "Some-Header"; HTTPHeaders[0].Value = "123"; HTTPHeaders[1].Name = "Some-Other-Header"; HTTPHeaders[1].Value = "456"; |