Re: WriteFile

From: Joseph M. Newcomer (newcomer_at_flounder.com)
Date: 08/14/04


Date: Sat, 14 Aug 2004 19:49:49 -0400

The limit is based on the largest contiguous buffer you can allocate in your address
space. This is highly variable and there is no particular way to say what it will be, but
certain a few hundred megabytes is probably feasible.

How do you know it is writing "incomplete data"? Did you look at the return value from
WriteFile, and make sure it returns a true value, and did you check that the bytesWritten
is the same as the count? Is your byte count correct? How do you compute it?

You have not really given enough information here to deduce what has gone wrong. For
example, if you have 200 bytes and you are writing them as formatted MIME data it will
have a length > 200.
                                        joe

On Fri, 13 Aug 2004 15:17:03 -0700, "Rudresh" <Rudresh@discussions.microsoft.com> wrote:

>Hi ,
>I am using WriteFile function for writting some data to harddisk.
>Is there any limit in size of data it can write.
>Basically this function is writting imcomplete data.
>I checked the contents of file. ( Writs encoded data to file then
>decode the data using Winzip ( MIME data )
>no of Bytes are at boundries like : fff, 9fff, ffff ...
>
>Any idea why this is hapening ?

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm



Relevant Pages

  • Re: Steven Goldmans picks for regular season awards
    ... GaryFL wrote: ... I am very surprised at his AL MVP vote and his AL MOY vote. ... believe his writing might be. ... You are in the 10% of fans who get what he's ...
    (alt.sports.baseball.ny-yankees)
  • Re: shareDenyNone
    ... threads are writing, ... >I have had some customers request that my software be able to open files ... >Does anyone have any experience with shareDenyNone? ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: How to "zero" a file after a certain size ?
    ... Michael Harris (MVP) wrote: ... >>Deleting the file would not work because some process is still ... > Use FSO to open it ForWriting and close it without writing anything... ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windows.server.scripting)
  • Re: WriteFile blocked infinetely
    ... which kicks in to kill your writing thread if it disappears for too long. ... communication API (CreateFile, WriteFile, ReadFile, SetCommTimeouts etc.). ... WriteFile function can never return due to the failure of other side ...
    (microsoft.public.pocketpc.developer.networking)
  • Re: WriteFile
    ... give us some sample code where you think the problem may occur from so ... we can make more precise judgement. ... > I am using WriteFile function for writting some data to harddisk. ... > Basically this function is writting imcomplete data. ...
    (microsoft.public.vc.language)

Quantcast