C ++ Win32 API Delete progress bar file

Using api windows, is there a way to delete a large file (say 1gb +) and track progress in some way? I am sure it is possible, but I do not know where to start ..

EDIT: Should be more specific, I want to move the file to the trash and show a progress bar similar to the study, although I might need a progress bar in the console or something else, so I don't want an exact copy.

EDIT 2: Yes, guess this is instant, had to be checked before I asked a question. Anyway, just to close this question?

+1
source share
2 answers

SHFileOperation FO_DELETE func FOF_ALLOWUNDO, . , FOF_SILENT.

SHFILEOPSTRUCT fileop = { 0 };
fileop.hwnd = hwndMain; /* your window */
fileop.wFunc = FO_DELETE;
fileop.pFrom = szFilePathToDelete;
fileop.fFlags = FOF_ALLOWUNDO /* | FOF_NOCONFIRMATION to recycle without prompting */;
int error = SHFileOperation(&fileop);

: , , , . (, ).

+5

, SetEndOfFile? http://msdn.microsoft.com/en-us/library/aa365531(v=vs.85).aspx. ( -, Windows-land).

[] ; . inode () 1gb.

-1

All Articles