We recommend using Visual Studio 2017

_ftell_nolock, _ftelli64_nolock


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at _ftell_nolock, _ftelli64_nolock.

Gets the current position of a file pointer, without locking the thread.

long _ftell_nolock(   
   FILE *stream   
__int64 _ftelli64_nolock(   
   FILE *stream   


Target the FILE structure.

Same as ftell and _ftelli64. For more information, see ftell, _ftelli64.

These functions are non-locking versions of ftell and _ftelli64, respectively. They are identical to ftell and _ftelli64except that they are not protected from interference by other threads. These functions might be faster because they do not incur the overhead of locking out other threads. Use these functions only in thread-safe contexts such as single-threaded applications or where the calling scope already handles thread isolation.

FunctionRequired headerOptional header

For more compatibility information, see Compatibility in the Introduction.


Stream I/O
fseek, _fseeki64
_lseek, _lseeki64
ftell, _ftelli64