Truncating size of file using _chsize()
-
For trancating file size using: int _chsize( int fd, long size); require to provide parameter "int fd" i.e. file descriptor. How to provide file descriptor?
-
For trancating file size using: int _chsize( int fd, long size); require to provide parameter "int fd" i.e. file descriptor. How to provide file descriptor?
There's a complete example in the documentation[^]
Cédric Moonen Software developer
Charting control [v3.0] OpenGL game tutorial in C++ -
For trancating file size using: int _chsize( int fd, long size); require to provide parameter "int fd" i.e. file descriptor. How to provide file descriptor?
If you have a handle to a file, you can do the same using the
SetFilePointer
andSetEndOfFile
APIs.«_Superman_»
I love work. It gives me something to do between weekends.