[Quote=引用 15 楼 hit_zjb 的回复:]
while(1)
{
pBuffer=malloc( dwSize );
printf("checking the error!\n");
pbData=pBuffer;
if (ReadFile(handlefile_, // handle of file to read
pBuffer, // handle of file to read
1024, // number of bytes to read
&length, // pointer to number of bytes read
NULL) == 0) // pointer to structure for data
{
printf("Reading of file has problem!\n");
}
while(1)
{
pBuffer=malloc( dwSize );
printf("checking the error!\n");
pbData=pBuffer;
if (ReadFile(handlefile_, // handle of file to read
pBuffer, // handle of file to read
1024, // number of bytes to read
&length, // pointer to number of bytes read
NULL) == 0) // pointer to structure for data
{
printf("Reading of file has problem!\n");
}
if (WriteFile(handlefile_, // handle to file to write to
pbData, // pointer to data to write to file
dwBytesTransferred, // number of bytes to write
&length,
NULL)) // pointer to number of bytes written
{
length+=dwBytesTransferred;
printf("\nThe datas have been preserved!\n");
}
if(*(pbData+63)==0x55)
{
printf("The phone is ringing!\n");
break;
}