Aimless
January 31st, 2002, 11:14
79152: APICALL: [398] SetFilePointer ( HFILE:00000100 , long:21230 , PTR:0012E7B4 , DWORD:00000000 )
H'lo All,
See the above API call? Its been made by an app, calling a reg file. The hwnd 100 that you see is the hwnd returned by the createfilea API. All is hunky dory, except...
Look at the second param. This param is 0x21230
This transalates to 135728 (decimal).
The second param in the API for SetFilePointer (see it in the WINHELP32) is:
lDistanceToMove: Specifies the number of bytes to move the file pointer. A positive value moves the pointer forward in the file and a negative value moves it backward.
The question is: Obviously, its trying to move the file pointer to position 135728 bytes forward in the file. You can call it approx. 135 KB in the file.
The big issue is: the reg file is 125 bytes in size!!! Yup!!
So why is this trying to move the pointer to so many bytes in the file when the file is a mere 125 BYTES and not Kbytes in length?
At first, I assumed it was a protection. But normal file open in normal apps (say notepad opening xyz.txt and seeking a word) ALSO give the same kind of issues.
The DistanceToMove is somehow GREATER than the file sizes.
Am I missing something? Can anyone assist in clarifying the above?
I use BC 6.5 (Standard Edition)
...Have Phun, Always.
H'lo All,
See the above API call? Its been made by an app, calling a reg file. The hwnd 100 that you see is the hwnd returned by the createfilea API. All is hunky dory, except...
Look at the second param. This param is 0x21230
This transalates to 135728 (decimal).
The second param in the API for SetFilePointer (see it in the WINHELP32) is:
lDistanceToMove: Specifies the number of bytes to move the file pointer. A positive value moves the pointer forward in the file and a negative value moves it backward.
The question is: Obviously, its trying to move the file pointer to position 135728 bytes forward in the file. You can call it approx. 135 KB in the file.
The big issue is: the reg file is 125 bytes in size!!! Yup!!
So why is this trying to move the pointer to so many bytes in the file when the file is a mere 125 BYTES and not Kbytes in length?
At first, I assumed it was a protection. But normal file open in normal apps (say notepad opening xyz.txt and seeking a word) ALSO give the same kind of issues.
The DistanceToMove is somehow GREATER than the file sizes.
Am I missing something? Can anyone assist in clarifying the above?
I use BC 6.5 (Standard Edition)
...Have Phun, Always.