Einzelnen Beitrag anzeigen

Gambit

Registriert seit: 28. Mai 2003
680 Beiträge
 
Delphi 7 Professional
 
#17

Re: Wie setzte ich ein Hochkomma als String?

  Alt 15. Sep 2003, 22:48
Hier mal ein Auszug aus der Unit, in der auch die Verschlüsselung des Attaches vorkommt:

Delphi-Quellcode:
{attach the user id string as the first paramter to all references of this ISAPI DLL}
  ChPos := FindSubStr(IsapiDllName, UpperCase(Response.Content), 1);
  while ChPos <> 0 do
    begin
    {copy out the URL}
    StartPos := ChPos + length(IsapiDllName);
    EndPos := FindSubStr('"', Response.Content, StartPos);
    S := copy(Response.Content, StartPos, EndPos-StartPos);

    {check if there are any parameters with this URL}
    ChPos := pos('?', S);
    if ChPos = 0 then
      Response.Content := copy(Response.Content, 1, StartPos-1) + S + '?Id=' + WebSession.GuidStr +
                          copy(Response.Content, EndPos, length(Response.Content))
    else
      begin
      {split the URL into its Action and Parameter pair}
      Action := copy(S, 1, ChPos-1);
      Parameters := copy(S, ChPos+1, length(S));
      ...
      end;
Knackpunkt scheint folgende Zeile zu sein:

EndPos := FindSubStr('"', Response.Content, StartPos); Damit wird doch alles was vor dem " kommt als URL interpretiert, was ja auch in den allermeisten Fällen stimmt. Nur in diesem einen(meinem) Fall nicht.
Ich glaube da liegt der Hund begraben...

Gambit
  Mit Zitat antworten Zitat