flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
nazha
how to set file pointer to a position > 4gb?
_________________ Assembly Asker |
|||
![]() |
|
nazha
Could you give me some example? Thanks!
|
|||
![]() |
|
f0dder
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
Thanks!
_________________ Assembly Asker |
|||
![]() |
|
nazha
bty, how to load the high dword of a qword to 32bit register under 32bit model?
|
|||
![]() |
|
f0dder
Code: mov eax, [qword + 0] ; low part mov edx, [qword + 4] ; high part ![]() |
|||
![]() |
|
comrade
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
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.