The Open PCDestFile For Binary Access Write As iFile
BytePos=1
LBufferLen=2048
Do
LResult=CeReadFile (lCeFileHandle, bytFile (0), _
LBufferLen, lBytesRead, 0 & amp;)
If (lResult And (lBytesRead=0)) Then
LResult=CeCloseHandle (lCeFileHandle)
The Close iFile
The Exit Do
The Else
For I=0 To lBytesRead - 1
Put iFile, BytePos + I, bytFile (I)
Next I
BytePos=BytePos + lBytesRead
End the If
Loop
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Above is part of the code, of which it is to obtain the bytes store content into the file, I am here to modify, modify the way to give a reading to the contents of the variable, the variable do accumulator, could you tell me how to modify prawns?
CodePudding user response:
above is part of the code, including "Put iFile, BytePos + I, bytFile (I)" this sentence is to obtain the bytes store content into the file, I am here to modify, modify the way to give a reading to the contents of the variable, the variable do accumulator, could you tell me how to modify prawns?-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sorry, add
CodePudding user response:
Dim lSum As Long
.
For I=0 To lBytesRead - 1
Put iFile, BytePos + I, bytFile (I)
LSum=lSum + bytFile (I)
Next I