flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
nazha 22 Mar 2009, 09:46
how to set file pointer to a position > 4gb?
_________________ Assembly Asker |
|||
![]() |
|
nazha 22 Mar 2009, 10:21
Could you give me some example? Thanks!
|
|||
![]() |
|
f0dder 22 Mar 2009, 10:33
Assuming you have your file position in EDX:EAX, something like the following...
Code: mov [ofsHigh], edx invoke SetFilePointer, [hFile], eax, addr ofsHigh, FILE_BEGIN cmp eax, INVALID_SET_FILE_POINTER jne @@succeeded invoke GetLastError cmp eax, NO_ERROR je @@succeeded ; there was an error seeking, handle it... @@succeeded: |
|||
![]() |
|
nazha 22 Mar 2009, 13:52
Thanks!
_________________ Assembly Asker |
|||
![]() |
|
nazha 22 Mar 2009, 15:17
bty, how to load the high dword of a qword to 32bit register under 32bit model?
|
|||
![]() |
|
f0dder 22 Mar 2009, 15:56
Code: mov eax, [qword + 0] ; low part mov edx, [qword + 4] ; high part ![]() |
|||
![]() |
|
comrade 22 Mar 2009, 22:37
Use SetFilePointerEx, it is much less confusing because it doesn't work in two different ways depending on how many bits of position data you pass in to it.
|
|||
![]() |
|
f0dder 22 Mar 2009, 23:37
comrade wrote: Use SetFilePointerEx, it is much less confusing because it doesn't work in two different ways depending on how many bits of position data you pass in to it. ![]() _________________ ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.