Export (0) Print
Expand All
div
eof
Expand Minimize
1 out of 2 rated this helpful - Rate this topic

_filelength, _filelengthi64 

Gets the length of a file.


long _filelength( 
   int fd 
);
__int64 _filelengthi64( 
   int fd 
);

Parameters

fd

Target the file descriptor.

Both _filelength and _filelengthi64 return the file length, in bytes, of the target file associated with fd. If fd is an invalid file descriptor, this function invokes the invalid parameter handler, as described in Parameter Validation. If execution is allowed to continue, both functions return –1L to indicate an error and set errno to EBADF.

Function Required header Compatibility

_filelength

<io.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

_filelengthi64

<io.h>

Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003

For more compatibility information, see Compatibility in the Introduction.

See the example for _chsize.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.