Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Incompatible types TCaption and PAnsiChar und was nun? (https://www.delphipraxis.net/58199-incompatible-types-tcaption-pansichar-und-nun.html)

lucius 2. Dez 2005 20:49


Incompatible types TCaption and PAnsiChar und was nun?
 
Hallo Leute,

Ich habe ein Problem, ich moechte mittels
Delphi-Quellcode:
var
  cDownStatus : cDownloadStatusCallback;
begin
  cDownStatus := cDownloadStatusCallBack.Create;
try
   URLDownloadToFIle(nil, Link.text, Datei.text, 0, CDownStatus);
   finally
   cDownStatus.Free;
end;
end;
eine Datei downloaden aber er gibt mir die Fehler Meldung
Zitat:

Incompatible types TCaption and PAnsiChar
weil ich den Link und den Datei Pfad mittels Editboxen uebergebe.
Kann ich das irgendwie umgehen? Denn ich komme um die Editboxen nicht rum.
Herzlichen Dank im voraus Leute.

Gruss Lucius.

Luckie 2. Dez 2005 20:51

Re: Incompatible types TCaption and PAnsiChar und was nun?
 
Mach einen Cast nach PChar.

lucius 2. Dez 2005 21:01

Re: Incompatible types TCaption and PAnsiChar und was nun?
 
Hi Luckie,

Zitat:

Mach einen Cast nach PChar
und wie mach ich das?
Kenn mich da noch nicht somit aus.

MFG, Lucius.

Luckie 2. Dez 2005 21:07

Re: Incompatible types TCaption and PAnsiChar und was nun?
 
Delphi-Quellcode:
URLDownloadToFIle(nil, PChar(Link.text), PChar(Datei.text), 0, CDownStatus);

lucius 2. Dez 2005 21:14

Re: Incompatible types TCaption and PAnsiChar und was nun?
 
Funktioniert Luckie, Herzlichen Dank auch.

Gruss Lucius.


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:20 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz