Page 1 of 1
SetEOF() ?
Posted: Mon Nov 10, 2003 11:33 pm
by RValois
It seems that this function is missing.
BTW Is the return value from OpenFile/OpenPack the File handle on Windows OS ?
Thank you,
RValois.
Re: SetEOF() ?
Posted: Tue Nov 11, 2003 5:26 am
by PB
Posted: Tue Nov 11, 2003 2:57 pm
by RValois
Thanks for answering but that is not what I am looking for.
SetEOF function is used to truncate/extend the file size.
http://msdn.microsoft.com/library/defau ... offile.asp
Regards,
RValois.
Posted: Tue Nov 11, 2003 3:31 pm
by Pupil
Yes, it's missing. Ff you desperately need this right now you can always use something like this:
Code: Select all
SetEndOfFile_(UseFile(#YourFileNr))
Posted: Tue Nov 11, 2003 3:51 pm
by RValois
Based on your information, UseFile() returns the Windows file handle.
What about OpenFile/OpenPack ? Could you confirm/deny if these functions also do return the Windows file handle?
Thank you,
RValois.
Posted: Tue Nov 11, 2003 5:21 pm
by Pupil
OpenFile returns the handle, of that i'm sure. I can't say anything about OpenPack though, because i've never had the need to get a file handle for that sort of file.
Posted: Tue Nov 11, 2003 6:01 pm
by freak
Note:
If you use SetEndOfFile_(UseFile(#YourFileNr)) to extend your file, Windows
will fill the new file space with data from your memory! This might be
some random nonsense data, but it could also be passwords, or some
personal data, that has just been in memory at that time.
So make sure, you fill the area with data, if neccesarry, with a lot of 0's
Timo