Thanks again for your speedy response, will look to add error messages next time I ask questions. I changed the code and there are currently no errors.
However this issue I am having is that when I manually give the the code below an XML file with string data type, it updates it to the server. However when I use the exe. from this code and call it in another program, which where I want to use it, it does not
update the data to the server.
My objective is automate to xml file data generated from a test in the other program to a server. So i will like to call the exe once the XML is generated before the program is done. Below is the code for the exe.:
int _tmain(int argc, _TCHAR* argv)
if(argc < 2)
cout << "Error: Not enough parameters!";
auto stream = concurrency::streams::file_buffer<uint8_t>::open(argv, std::ios_base::in).get();
http_client client (U("My SERVER ADDRESS"));
http_response response = client.request(methods::POST, U("path"), stream, U("string_t")).get();
if(response.status_code() == status_codes::OK)
const utility::string_t body = response.extract_string().get();
The code I use to call the exe in the other program is:
system ("uploadXMLfiletoserver.exe ") +XML filename ";
I will have just doen this with all in the main program, but as it does not support REST SDK, i get this error below when i tried,
error C1189: #error : <atomic> is not supported when compiling with /clr or /clr:pure.
I am now trying to just call the exe. from the program that it works with and feed the exe an xml file to upload to a sever.
I hope my question is clear enough, I am still trying to improve my programming skiils so please bear with me if my question is not the brightest.
Thanks and hope to hear from you soon.