//--------------------------------------------------------------------------- void __fastcall TFileOperationProgressType::ThrottleToCPSLimit( unsigned long Size) { unsigned long Remaining = Size; while (Remaining > 0) { Remaining -= AdjustToCPSLimit(Remaining); } }
//--------------------------------------------------------------------------- unsigned long __fastcall TFileOperationProgressType::TransferBlockSize() { unsigned long Result = TRANSFER_BUF_SIZE; if (TransferedSize + Result > TransferSize) { Result = (unsigned long)(TransferSize - TransferedSize); } Result = AdjustToCPSLimit(Result); return Result; }
//--------------------------------------------------------------------------- unsigned long __fastcall TFileOperationProgressType::LocalBlockSize() { unsigned long Result = TRANSFER_BUF_SIZE; if (LocallyUsed + Result > LocalSize) { Result = (unsigned long)(LocalSize - LocallyUsed); } Result = AdjustToCPSLimit(Result); return Result; }