I am executing cmd.exe commands via a C program with the CreateProcess function. I check to see if cmd.exe has terminated with the GetExitCodeProcess function, by checking to see if the process exit code equals anything except STILL_ACTIVE. This works fine with commands like "cmd /c echo Hello World", but for commands like "cmd /c dir c:\test", cmd.exe will never terminate if the directory contains more than 60 entries, cmd.exe will terminate if there are 60 or less entries in the directory. Does anyone know why it behaves like this? Thanks a lot.