0
Quelque chose ne va pas avec ceci en général?Pourquoi ce thread ne lit-il pas systématiquement toutes les données du tube?
CallingFunction()
{
CreatePipe()
CreateMutex()
CreateThread(ThreadFunction)
while(there is data left to send)
{
WriteFile(send data in 256 byte chunks)
}
WaitForSingleobject() //don't return until ReadThread is done
return 0;
}
ThreadFunction()
{
WaitForSinglObject()
while(bytesRead != totalBytestoReadFileSize)
{
ReadfromPipe(in chunks)
update bytesRead++
}
ReleaseMutex()
return 0;
}
Avant la fonction appelante se termine -
FileSize: 232016
BytesWrittenToPipe: 232016
BytesReadFromPipe: 231946 ou 232012 ou 231840 -> Pourquoi ne correspond pas?