News:

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

CreateProcess question

Started by jdoe, April 03, 2007, 03:23:01 AM

Previous topic - Next topic

jdoe


Hi,

Somebody can confirm me this about the lpCommandLine parameter of CreateProcess Win32 API.

Quote

The maximum length of this string is 32K characters.

            Windows 2000:  The maximum length of this string is MAX_PATH characters.


Why the length fall this low on Windows 2000 ? It must be an error, no ?

:snooty:

p.s. Sorry, I can't have a hand on a Windows 2000 box, so I can't verify by myself.


MichaelW

Testing under Windows 2000 SP4, passing a 32767-byte command line, the called app received 32764 bytes.
eschew obfuscation

P1

I beleive it only affects calling a program that would open using NTVDM, because it's DOS restriction.

Regards,  P1   :8)

jdoe


I'm working on something that need to be compatible from 2000 and higher and I was not sure that my call to CreateProcess would fails because the command line I'm passing is higher then MAX_PATH.


Thanks Michael for taking the time to test it. It's appreciated.

:U