Dear all,
i have problem using this function with very big size, i've read that i need to use lpDistanceToMoveHigh using scale to minimize lDistanceToMove value to int32, but all my try cause crash also in purebasic debug mode, anyone can help me to how to calculate right offset for very big numbers like 500 GB ?
Thanks
Best Regards
SetFilePointer_
Re: SetFilePointer_
You need to use quads to calculate the offset. Also using a structure like this might help:
Code does not work as is, but you should be able to get the general idea how to call the function.
Code: Select all
Structure LargeInt
Low.l
Hi.l
EndStructure
Structure LargeOffset
StructureUnion
q.q
ll.LargeInt
EndStructureUnion
EndStructure
Offset.LargeOffset\q = 500*1024*1024*1024
SetFilePointer_(hFile, Offset\ll\Low, @Offset\ll\Hi, #FILE_BEGIN)
Re: SetFilePointer_
The PureBasic File library supports large files out of the box. All you have to do is use quads to store file offsets and that's all.
quidquid Latine dictum sit altum videtur
Re: SetFilePointer_
Thanks, i'll try in next days 
