Forum: Win32/Win64 API (native code)
Delphi
by wurzelzwerg,
11. Apr 2014
Random Bug :lol:
Na gut, habs grad noch überlebt :stupid: :cheers:
Forum: Win32/Win64 API (native code)
Delphi
by wurzelzwerg,
11. Apr 2014
Das perverse war ja dass es bei mir ohne Codeoptimierung funktioniert hat. :shock:
Forum: Win32/Win64 API (native code)
Delphi
by wurzelzwerg,
11. Apr 2014
Danke, das wars. Mit LongBool gehts.
Forum: Win32/Win64 API (native code)
Delphi
by wurzelzwerg,
11. Apr 2014
Hilft beides nicht.
Cancelled ist davor und danach false und CopyFileEx fliegt raus.
var
Cancelled: Boolean;
begin
Cancelled:= false;
if not CopyFileEx('d:\Neues Textdokument.txt',
'd:\Neues Textdokument (Kopie).txt',
Forum: Win32/Win64 API (native code)
Delphi
by wurzelzwerg,
11. Apr 2014
Deine Version geht.
Das fliegt raus:
var
Cancelled: Boolean;
begin
if not CopyFileEx('d:\Neues Textdokument.txt',
'd:\Neues Textdokument (Kopie).txt',
Forum: Win32/Win64 API (native code)
Delphi
by wurzelzwerg,
11. Apr 2014
Nein, ohne callback(nil) das gleiche Problem.
Am Cancel liegt das nicht, das war vorher auch dort nicht drin, brauch ich auch nicht.
Die Funktion wird sofort abgebrochen. Aber eben nur wenn Optimierung an ist.
pbCancel
If this flag is set to TRUE during the copy operation, the operation is canceled. Otherwise, the copy operation will continue to completion.
Callback sendet nur...
Forum: Win32/Win64 API (native code)
Delphi
by wurzelzwerg,
11. Apr 2014
Die Zeile gehört eigentlich nicht rein, war nur um das zu finden.
Das setzt man auf true um während des kopierens abzubrechen. So weit kommt man aber erst garnicht.
Forum: Win32/Win64 API (native code)
Delphi
by wurzelzwerg,
11. Apr 2014
Wozu sourcecode? Der ist ja kaum falsch wenn es ohne Optimierung funktioniert.
Ausserdem ist der älter, d.h. in 2006 gabs auch mit Optimierung keine Fehler.
function TFileCopier.DoFolderFiles( const ASourcePath, ATargetPath: string;
const Op: TFolderOp): Int64;
var
StrName,
MySearchPath,
Forum: Win32/Win64 API (native code)
Delphi
by wurzelzwerg,
10. Apr 2014
Moin zusammen,
ich benutze DelphiXE5. CopyFileEx funktioniert da nicht wenn ich Codeoptimierung aktiv habe. :shock:
D.h. es kommt der Fehler "Die Anforderung wurde abgebrochen"
Delphi-Bug oder gibts dafür eine andere Erklärung?
Danke