WriteFile() Problem? Windows CE 4.1 - Windows CE

This is a discussion on WriteFile() Problem? Windows CE 4.1 - Windows CE ; We recently had a bug in our application which meant we kept creating files and our housekeeping wasn't working so we were unable to delete any so unsurprisingly we ran out of disk space. Fair enough this was my fault. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: WriteFile() Problem? Windows CE 4.1

  1. WriteFile() Problem? Windows CE 4.1

    We recently had a bug in our application which meant we kept creating files
    and our housekeeping wasn't working so we were unable to delete any so
    unsurprisingly we ran out of disk space. Fair enough this was my fault.
    But what seemed a bit strange was that the whole directory structure appears
    to have got completely mucked up. For example directories are no longer
    visible and files have been renamed, and in one case WinCE would no longer
    boot. I have seen some comments that there is a bug in Writefile() which
    means that if it runs out of space it still keeps trying to write and can
    stomp all over program memory as well.

    Can anyone tell me if this is a known problem?

    Needless to say I am now wrapping my Writefile() calls in my own function
    that does some checking to see if that helps.

    Stephen.


    --
    Stephen Robertson
    Findlay Irvine Ltd
    http://www.findlayirvine.com
    Email: stephenrobertson@"same as web url"



  2. Re: WriteFile() Problem? Windows CE 4.1

    Hi! I'm using CE 4.2 but also have very strange WriteFile problem on
    my Advantech PM-5820 platform (Geode, x86 based)
    i'm using code like this

    char buffer[1000];
    WriteFile(f, &buffer[0], 500, &Writted, NULL);
    WriteFile(f, &buffer[0], 600, &Writted, NULL);
    WriteFile(f, &buffer[0], 800, &Writted, NULL);

    writing 500 bytes ... OK
    writing 600 bytes... OK
    writing 800 bytes... system hung up, HDD-led is turned on, in debug
    mode error comes up about some pure virtual function call. So...

    VERY strange error! I can write buffers that are at about 500 bytes
    big, but cant writes more then 700-800 bytes! Besides, it seems, that
    writes operations are unbuffered, because every WriteFile function
    call turns HDD-led immediately turn ON/OFF, and writing process is too
    slow 1Mb at about 5 seconds! On the same platform under Win98 writing
    process with same functions and ANY buffer sizes are ~10 times faster!
    Maybe your error is some kind of mine...
    What hardware platform d u have?
    For example, for CX5530 chipsed (Advantech PCM-5820... and others)
    audio driver (Geode audio driver) for AD???? codec has ERROR (LM????
    codec works fine)! This is 100% proven fact, so now I'm nervous about
    IDE support drivers in this platform...



    "Stephen Robertson" wrote in message news:...
    > We recently had a bug in our application which meant we kept creating files
    > and our housekeeping wasn't working so we were unable to delete any so
    > unsurprisingly we ran out of disk space. Fair enough this was my fault.
    > But what seemed a bit strange was that the whole directory structure appears
    > to have got completely mucked up. For example directories are no longer
    > visible and files have been renamed, and in one case WinCE would no longer
    > boot. I have seen some comments that there is a bug in Writefile() which
    > means that if it runs out of space it still keeps trying to write and can
    > stomp all over program memory as well.
    >
    > Can anyone tell me if this is a known problem?
    >
    > Needless to say I am now wrapping my Writefile() calls in my own function
    > that does some checking to see if that helps.
    >
    > Stephen.


+ Reply to Thread