News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Windows sort.exe maximum string length.

Started by KeepingRealBusy, December 30, 2010, 10:44:38 PM

Previous topic - Next topic

KeepingRealBusy

I just ran into an interesting fact, sort.exe will not accept a string that is 65535 characters long, even if it is executed with the "REC 65535" option. It will accept a string that is 65535 characters long with the "REC 65535" option, so sort.exe must be counting the CRLF as part of the record.

Since Windows supports Unicode path names up to 32767 TChars (65534 BYTES), does that also mean that the 32767 count must include the terminating CRLF, thus the path itself must be only 32766 TChars long?

hutch--

That is probably so but its not a big deal to roll your own. Tokenise the string in place then sort it and write it back to a file.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php