Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Algorithmen, Datenstrukturen und Klassendesign (https://www.delphipraxis.net/78-algorithmen-datenstrukturen-und-klassendesign/)
-   -   Operation status (https://www.delphipraxis.net/155474-operation-status.html)

value is NULL 25. Okt 2010 13:06

Operation status
 
Hi Delphianer

Ich benutze in meinem Code folgende Function:

Delphi-Quellcode:
function CopyDir(const fromDir, toDir: string): Boolean;
var
  fos: TSHFileOpStruct;
begin
  ZeroMemory(@fos, SizeOf(fos));
  with fos do
  begin
    wFunc := FO_COPY;
    fFlags := FOF_FILESONLY;
    pFrom := PChar(fromDir + #0);
    pTo := PChar(toDir)
  end;
  Result := (0 = ShFileOperation(fos));
end;
das ganze wird eine Console App, gibt es irgendeine Möglichkeit, während des Kopier vorganges einen Status anzuzeigen ? egal ob in Prozent oder in zB X MB von 129 MB ?

Vielen Dank im Voraus!

LG

himitsu 25. Okt 2010 13:34

AW: Operation status
 
PS: In der CodeLib sollte was zu finden sein. :wink:

Ansonsten ... wie wäre es mit MSDN-Library durchsuchenCopyFileEx oder MSDN-Library durchsuchenMoveFileWithProgress?

Oder reicht dir schon ein Fortschrittsdialog, wie im Explorer?
FOF_SIMPLEPROGRESS

und
Zitat:

Zitat von MSDN
See ICopyHook::CopyCallback for details on implementing copy callback handlers.


Luckie 25. Okt 2010 13:48

AW: Operation status
 
Bitte gib deinem ersten Beitrag einen aussagekräftigen Titel.


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:06 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