flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > [fasmg] windows lseek |
Author |
|
Mike Gonta 25 May 2017, 21:56
Code: invoke SetFilePointer, ebx, eax, [position_high], ecx |
|||
25 May 2017, 21:56 |
|
Tomasz Grysztar 25 May 2017, 22:06
Thank you for spotting this. It shows that I never tested it with really large files.
|
|||
25 May 2017, 22:06 |
|
Mike Gonta 26 May 2017, 12:16
Code: lseek: ; in: ebx = file handle, cl = method, edx:eax = offset ; out: edx:eax = new offset from the beginning of file, cf set on error ; preserves: ebx, esi, edi movzx ecx,cl mov [position_high],edx invoke SetFilePointer,ebx,eax,position_high,ecx cmp eax,-1 je interface_error mov edx,[position_high] clc retn MSDN wrote: If the return value is INVALID_SET_FILE_POINTER and if lpDistanceToMoveHigh is non-NULL, an application must call |
|||
26 May 2017, 12:16 |
|
Tomasz Grysztar 26 May 2017, 14:12
Good catch! Corrected, thank you again.
|
|||
26 May 2017, 14:12 |
|
Tomasz Grysztar 26 May 2017, 14:51
I'm OK with SetFilePointer, it just needed these corrections.
|
|||
26 May 2017, 14:51 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.