我看MSDN上说一个目录的长度最大可以到3万多字节?(NTFS文件系统下),即使是FAT32也可以支持一个不短的长度请问一般我们写程序时,该如何为路径分配空间(使用char数组)。 难道非要用自动变长的String么

解决方案 »

  1.   

    MAX_PATH 256文件中是这样定义的,不知可否修改这个值。
      

  2.   

    既然是SDK中定义的, 不能 
      

  3.   

    以下出自MSDN中CreateFile函数说明:
    In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path.