curl-library
Simpel questions for curl_multi (Delphi) or C
Date: Wed, 14 Oct 2015 13:11:30 +0200
Hi.
Has found a way around my delphi curl_multi download, so now I have a
new problem
knowing which Page the downloaded data comes from.
If you have an example in C, I would be grateful too.
Is there a way to Add some info into UserData, for instance a number so
I can track
with handle there is doing the download ???
Some Delphi Code..
Function MyWriteFunction(IncomingData: pChar;ItemSize,
ItemCount:LongWord; UserData:pointer):LongWord; cdecl;
var
I : LongInt;
Html : String:
begin
Html:='';
Result:= ( ItemSize * ItemCount );
for I:=0 to Result-1 do
begin
Html:=Html+IncomingData[I];
end;
end;
Id:=1; // need to be a pointer
curl_easy_setopt(handle1, CURLOPT_WRITEFUNCTION, @MyWriteFunction);
curl_easy_setopt(handle1, CURLOPT_WRITEDATA,Id);
Id:=2; // need to be a pointer
curl_easy_setopt(handle2, CURLOPT_WRITEFUNCTION, @MyWriteFunction);
curl_easy_setopt(handle2, CURLOPT_WRITEDATA,Id);
etc
/Thanks Michael.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2015-10-14