Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid Seek Offset
Message
From
08/05/2019 12:13:58
 
 
To
08/05/2019 09:12:01
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
01668410
Message ID:
01668471
Views:
51
The mentioning of memory just reminded me of something -- I do recall some time in the past over using SYS(3050) to set the memory buffer sizes -- and that limiting the buffer sizes to 512MB or less would often help to reduce instances of some problems.

>Hi Chen,
>
>as you (probably together with Christoph) know most about vfp inner workings:
>is the SetFilePointer API also used when (only) running compiled code ?
>As vcx/scx is only a table by another extension (with memo file to boot...) this seems possible.
>On .fxp: as the mechanism stems from memory starved times (16-bit runtime memories...), it might have made sense decades ago to implement overlay mechanism to avoid loading everything into back then minimal RAM.
>
>Any knowledge from previous reserach ?
>
>tia
>
>thomas
>
>>Hi Dmitry,
>>
>>Usually, when vfp calls the Windows API SetFilePointer() failed, it occurs the error:
>>103 Invalid seek offset.
>>
>>For example,
>>SetFilePointer(h1,5,0,0); // curoffset = 5
>>SetFilePointer(h1,-10,0,1); // curoffset = -5? error!
>>// SetFilePointer() returns -1 (INVALID_SET_FILE_POINTER),
>>// and then VFP displays the error: 103 Invalid seek offset.
>>
>>For the VFP code:
>>=strtofile("0123456789",'test.dat')
>>h1=fopen("test.dat",0)
>>?fseek(h1,5,0)
>>?ferror() && returns 0 ok.
>>wait
>>?fseek(h1,-10,1)
>>?ferror() && returns 25 Seek error (can't seek before the start of a file)
>>wait
>>=fclose(h1)
>>
>>VFP catched the error, and the ferror() function returns 25 Seek error.
>>
>>I think the most common case is:
>>the index file (.cdx, .idx, or other files) is corrupted.
>>
>>Best regards.
>>
>>Chen
>>2019.5.8
Previous
Reply
Map
View

Click here to load this message in the networking platform