On Wednesday 25 September 2002 06:13 pm, Francois Gouget wrote:
On Wed, 25 Sep 2002, Ove Kaaven wrote:
On Tue, 24 Sep 2002 chrismorgan@rcn.com wrote:
[...]
I have a script that passes a long argument string when calling a command handler(command.com or other comspec replacement).
[...]
is breaking my application by truncating the 200+ character argument at 126 characters. Do we still need to truncate at 126?
Yes, it's an intrinsic DOS limitation from the early DOS days.
[...]
This is only a guess, though, I don't know to what extent something like this is supported by DOS or Windows itself, nor what protocol they really use.
Note that this limitation should only be in effect when calling Dos applications. Win32 console applications can receive command lines of up to 32KB on NT and any size on Win9x. So maybe the problem is that you are using command.com as the COMSPEC. Does this happen with wcmd.exe (or the native cmd.exe)?
I haven't tested this with wcmd.exe. I'm also not using command.com as my comspec, I'm using 4nt, a command.com replacement. The real question is how to know if the version of dos is old enough to limit the command line to 126 characters in this case. I would argue that we can go to the full 256 characters at this point. I'm not sure how support of 32kb+ long command lines would be implemented or if many apps even use such long command lines.
Chris