Is there a maximum limit how long strings can be passed to Delphi console application? I am thinking of passing in a lots of JSON data. I would read the data in with ParamStr(x) function.
The max length for CMD.EXE is 8192 characters. This would be the max amount receivable by a Delphi console app because of a limitation in CMD.EXE itself.
The max command length for CreateProcess is 32767 characters. This is due to the UNICODE_STRING structure.
ShellExecute/EX is limited to the INTERNET_MAX_URL_LENGTH, which as Gamecat mentioned is 2047 characters, unless you're running on Win95; there the limit is only MAX_PATH.
For more info, see Raymond Chen's blog post
The commandline is limited by the OS to 2047 characters.
If you want to use more data, you can use a file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With