CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Sep 2005
    Posts
    336

    WriteFile/ReadFile repeat last lines

    Hi

    Code:
    	do
    	{
    		bReadSuccess = ReadFile( hFile, strBuffer, sizeof(strBuffer), &nRead, NULL);
    		bWriteSuccess = WriteFile( hFile2, strBuffer, sizeof(strBuffer), &nWrite, NULL);
    	}while(bReadSuccess && bWriteSuccess && (nRead > 0));
    a.txt's last line is:
    315614,05r re regf

    b.txt's last lines are:
    315614,05r re regf
    315614,05r re regf
    315614,05r re

    What is wrong with that loop?
    Thanks.
    Last edited by sawer; April 6th, 2009 at 10:59 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured