Good evening,

i have just a little problem:

I write in a file and want to jump back to a specify adress to write some data again.
I'm trying SetFilePinter, but that dont work correctly:

MOV pos, 100
INVOKE SetFilePointer, hFile, 0, 0, FILE_BEGIN
INVOKE SetFilePointer, hRFile, pos, 0, FILE_BEGIN

how to use SetFilepoiner right? - I want to jump at the beginning of the file and then 100 bytes further.

Greets !
Posted on 2003-10-04 16:00:09 by Bubu-Boy
Hello Bubu-Boy,

With open file and file handle is hFile, this works.
Let's say you want to write some data 100 bytes from start of file.

mov dwFilePointer,100
invoke SetFilePointer,hFile,dwFilePointer,\

invoke WriteFile,hFile,...........

Just make sure WriteFile parameters are correct, i.e pointer to a valid data buffer to write from, and the number of bytes to write.

hope this is helpful, best regards,

Posted on 2003-10-04 17:04:56 by czDrillard
:stupid: - When kids are doing some programming while beeing asleep:grin:
the dwFilePointer had the value -4880.
Why that knows the vulture.

Thank you!
Posted on 2003-10-05 00:41:33 by Bubu-Boy