News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

CreateFileW and the "nearly" 32,000 chars limit

Started by jj2007, April 22, 2022, 06:23:34 PM

Previous topic - Next topic

jj2007

Quote from: José Roca on April 26, 2022, 01:37:15 AM
There are people that use deeply nested folders/subfolders and the lenght of the combined names sometimes exceed MAX_PATH.

Such people should be locked in a psychiatric clinic, or be forced to work in Redmond :badgrin:

Just joking, José. I wonder if there is any risk in using the \\?\ scheme by default :rolleyes:

José Roca

There is at least one limitation: you can't use it with relative paths.

https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd

José Roca

What I do is to use always the W function and let the onus to the user. If he needs more than MAX_PATH, he must add the \\?\ prefix.

jj2007

Quote from: José Roca on April 26, 2022, 02:42:25 AM
There is at least one limitation: you can't use it with relative paths.

Good point. Same for \Masm32\some.txt paths. So it's quite limited, not worth to change all file I/O macros.