Answer the question
In order to leave comments, you need to log in
How to get value from c++ builder thread?
Good day to all.
The question is, how to get the fs value from the stream?
The following code saves the resulting value, "1", to the "in.txt" file.
TStringList *s = new TStringList;
TMemoryStream *fs = new TMemoryStream();
s->Clear();
s->Add("sLine=123");
IdHTTP1->Request->Connection = "keep-alive";
IdHTTP1->Request->ContentType = "application/x-www-form-urlencoded";
IdHTTP1->Request->ContentLength = 9;
IdHTTP1->HandleRedirects=true;
IdHTTP1->Post( "http://www.example.com/index.php",s,fs);
fs->SaveToFile("in.txt");
char buf;
ShowMessage(fs->Read(&buf, 1));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question