if (StrStr (TempLine, L"ShellCommand,") == TempLine) { LoopVariable++; }
This line fails because, with redirected input, the file has the UCS-2 byte order mark, so the string "ShellCommand," is not at the beginning of the line. With the file, the byte order mark is not present. Why? if (StreamingUnicode) { TempLine = ParseReturnStdInLine (FileHandle); } else { TempLine = ShellFileHandleReturnLine (FileHandle, &Ascii); } The Shell library function ShellFileHandleReturnLine will strip off the byte order mark. But the ParseReturnStdInLine does not. So the first character on the line is not 'S', it is the byte order mark. Tim _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel