Buena tarde
estoy intentando copiar archivos de un directorio pero no se que error estoy cometiendo ya que no me lo permite por que no tiene acceso
Código Delphi
[-]
function ProgressRoutine(TotalFileSize, TotalBytesTransferred, StreamSize,
StreamBytesTransferred: LARGE_INTEGER;
dwStreamNumber, dwCallbackReason: DWORD;
hSourceFile, hDestinationFile: THandle; lpData: Pointer): DWORD;
var
Value: integer;
begin
Application.ProcessMessages();
if (dwCallbackReason = CALLBACK_CHUNK_FINISHED) then
FrmUpdateCopy.bp.Progress := (int64(TotalBytesTransferred) * 100)
div int64(TotalFileSize);
Result := PROGRESS_CONTINUE;
end;
procedure TFrmUpdateCopy.BtnIniciarClick(Sender: TObject);
var
Fuente, Destino: PChar;
begin
Fuente := PChar(ExtractFilePath(Application.ExeName) +
'\data\c\temp\update\');
Destino := PChar(ExtractFilePath(Application.ExeName));
Cancel := false;
CopyFileEx(Fuente, Destino, @ProgressRoutine, nil, @Cancel, 0);
ShowMessage(SysErrorMessage(GetLastError()));
end;
de antemano les agradesco