Hey guys,

I'm trying to use a variable to move around in my files.

I've decalred a WORD called FilePointer.
This is how I've invoked SetFilePointer so far:


invoke SetFilePointer, hFile, addr FilePointer, NULL,FILE_BEGIN
invoke SetFilePointer, hFile, FilePointer, NULL,FILE_BEGIN
invoke SetFilePointer, hFile, 0, addr FilePointer,FILE_BEGIN


I'm afraid they don't work.
I was reading the Win32 Reference, and they mention a High-Order word. I don't understand that at all...
So I tried making FilePointer an SDWORD... My application is still "frozen" refusing to be forcefully terminated .
:mad:
I may actually have to restart, after 11 flawless days... sigh.
It's doing something with the SDWORD... cuz the memory is fluxuating up and down.
anyway... a lil help plz =]

thanks,
Homer
Posted on 2003-03-14 06:07:04 by Homer
well it finally crashed itself ;)
Posted on 2003-03-14 06:25:58 by Homer


DWORD SetFilePointer(
HANDLE hFile,
LONG lDistanceToMove,
PLONG lpDistanceToMoveHigh,
DWORD dwMoveMethod
);


PLONG lpDistanceToMoveHigh you don't need if you aren't processing very large files more than 4G so just use 0
in your code FilePointer must be a DWORD



invoke SetFilePointer, hFile, FilePointer,0,FILE_BEGIN
Posted on 2003-03-14 06:34:26 by Hiroshimator
btw... FilePointer should be 32bit, ie DWORD.
The high value is for values that can only be stored in 64bits, ie in EDX:EAX
Posted on 2003-03-14 06:44:14 by roticv
Thanks for all the info guys, works like a charm Hiroshimator.

I can't even imagine dealing with 4G files... :eek:
Posted on 2003-03-14 17:20:44 by Homer