fseek32( filepointer , positie , SEEK_SET )
What is the value of positie or is it a typo?
ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
This fseek32 function is an implementation-dependent nonstandard trick: standard C RTL fseek/ftell expects/returns long int (signed 32-bit for VC++) values only. I think it can't move file pointers over 31-bit boundary (you see that).
Try to rewrite fseek32 with VC++ non-standard _fseeki64 function with long long (64-bit, old typename __int64) offset parameter.
ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348
It's _fseeki64 I think and it's in
ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
I never used _fseeki64 too. It's declared in VC++ . It has the same parameters as fseek but offset parameter has long long (64-bit in VC++) type.
You have VC++ 2008 installed. Write _fseeki64, select this id then press F1 ;) or see help on fseek function.
It seems you need a very simple correction:
inline
int fseek32(FILE* stream, unsigned int offset, int origin)
{
return _fseeki64(stream,offset,SEEK_SET);
}
ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348