dwBlockLen
の値を変更する必要はありません(問題は解決しません)。 dwBlockLen
の値は、で読み取られたデータの量をで決定します。 Whileループは、完全なソースファイルを読み込むために存在します。 whileループを終了する条件は次のとおりです。
これは、読み取るデータがなくなり、ループが終了することを意味します。
以下のコードで `if(dwCount < = dwBlockLen) 'という条件をデバッグする必要があります。ソースファイルを読み込む際に問題が発生する可能性があります。
// Decrypt the source file, and write to the destination file.
bool fEOF = false;
do
{
//-----------------------------------------------------------
// Read up to dwBlockLen bytes from the source file.
// ...
if(dwCount <= dwBlockLen)
{
fEOF = TRUE;
}
//-----------------------------------------------------------
// Decrypt the block of data.
// ...
//-----------------------------------------------------------
// Write the decrypted data to the destination file.
// ...
//-----------------------------------------------------------
// End the do loop when the last block of the source file
// has been read, encrypted, and written to the destination
// file.
}while(!fEOF);
出典
2016-03-30 08:18:07
vcp
だから何があなたを停止するのですか?それは疑問ではなく、*問題*のように思えます。 – WhozCraig