BASS_TAG_HTTP

Started by Crack-Hat,

Crack-Hat

how do i list all the returned strings?
from BASS_TAG_HTTP ionly get the
HTTP/1.0 200 OK
i use delphi and have no idea what VisualBasic is
tried to assign to stringlist but didnt work

please help

Ingolf2

I use these methods for it. Maybe it will help you out...

function GetTagsData(Input: PChar): String;
var
  I: Integer;
begin
  I := 0;
  Result := '';
  if Input  <> '' then begin
    repeat
      if Input[I] = #0 then Result := Result + #13
      else Result := Result + Input[I];
      Inc(I);
    until (Input[I] = #0) and (Input[I-1] = #0);
  end;
  Result := Copy(Result,1,System.Length(Result)-1);
end;

procedure DecodeTags(TagsStr: String; Output: TStrings);
var
  S: String;
  I: Integer;
begin
  S := StringReplace(TagsStr,#0,#13,[rfReplaceAll]);
  S := StringReplace(S,';',#13,[rfReplaceAll]);
  S := StringReplace(S,'''','',[rfReplaceAll]);
  Output.Text := S;
  for I := 0 to Output.Count-1 do begin
    Output[I] := StringReplace(Output[I],':','=',[]);
  end;
end;

georgebou

You could use the

function ExtractStrings(Separators, WhiteSpace: TSysCharSet; Content: PChar; Strings: TStrings): Integer;
from Unit Classes. In my programs it seems to work fine.