![]() |
Incompatible typen - string und pchar
hi leute, ich mal wieder...
folgendes problem zu folgender zeile code: Incompatible typen - string und pchar MoveFile(pchar(Filepath),WinDir + '\'+ pchar(Filepath); danke für hilfe cu agm65 |
Re: Incompatible typen - string und pchar
Moin agm,
der erste Parameter ist doch Ok, und der zweite wird angemeckert. Wie also muss der zweite Parameter geändert werden, damit er so wie der zweite aussieht? |
Re: Incompatible typen - string und pchar
wie wärs mit
Delphi-Quellcode:
Falls du die Funktion IncludeTrailingBackslash nicht hast, kannst du immer noch WinDir+'\'+FilePath in die Klammer schreiben
PChar(IncludeTrailingBackslash(WinDir) + FilePath);
mfG mirage228 |
Re: Incompatible typen - string und pchar
nein also das hat alles nichts gebracht...gibts sowas wie inttostr für pchar ?
|
Re: Incompatible typen - string und pchar
Moin agm,
Zitat:
So muss es gehen
Delphi-Quellcode:
Voraussetzung: FilePath und WinDir sind vom Typ String.
MoveFile(pchar(Filepath),PChar(WinDir + '\'+ Filepath));
Wenn ich mir das noch einmal genau ansehe: Compilieren wird dann gehen, aber funktionieren wird es doch nicht, weil ich vermute, dass FilePath auch das Laufwerk enthält. FilePath beim zweiten Parameter solltest Du noch einmal überdenken. |
Re: Incompatible typen - string und pchar
jo thx das geht
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:06 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz