- /* If it's too long, then we'll have a problem */
- if ((strlen(lpCommandLine) + 1) * sizeof(WCHAR) <
- NtCurrentTeb()->StaticUnicodeString.MaximumLength)
- {
- /* Cache it in the TEB */
- CommandLine = Basep8BitStringToStaticUnicodeString(lpCommandLine);
- }
- else
- {
- /* Use a dynamic version */
- Basep8BitStringToDynamicUnicodeString(&LiveCommandLine,
- lpCommandLine);
- }
- }
- else
- {
- /* The logic below will use CommandLine, so we must make it valid */
- CommandLine = &DummyString;