Path Field Limits
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 Path Field Limits.
Syntax
#include <stdlib.h>
These constants define the maximum length for the path and for the individual fields within the path.
| Constant | Meaning |
|---|---|
_MAX_DIR | Maximum length of directory component |
_MAX_DRIVE | Maximum length of drive component |
_MAX_EXT | Maximum length of extension component |
_MAX_FNAME | Maximum length of filename component |
_MAX_PATH | Maximum length of full path |
The C Runtime supports path lengths up to 32768 characters in length, but it is up to the operating system, specifically the file system, to support these longer paths. The sum of the fields should not exceed |