Hello, guys,
I'm programming a little windows application in asm, but don't know which windows api to use to change the size of a file. I know that MFC classes can help to do the job more easier, but using MFC in asm is really not that fun (at least for me). So , can anybody give any idea of how to do this in pure win32api?

thanks in advance
Posted on 2004-05-25 11:18:05 by FredLiu
CreateFile(..)
SetFilePointer(..)

should do the trick
Posted on 2004-05-25 11:22:28 by Delight
You have to call SetEndOfFile afterwards.
Posted on 2004-05-25 12:43:40 by Sephiroth3
Note that it is not an error to set the file pointer to a position beyond the end of the file. The size of the file does not increase until you call the SetEndOfFile, WriteFile, or WriteFileEx function. A write operation increases the size of the file to the file pointer position plus the size of the buffer written, leaving the intervening bytes uninitialized.
Posted on 2004-05-25 17:25:47 by Mecurius
thank u ~~
Posted on 2004-05-26 04:28:33 by FredLiu