GetConsoleOutputCP GetConsoleSelectionInfo GetConsoleScreenBufferInfoReadConsoleOutput Reads character and color attribute data from a rectangular block of character cells in a console screen buffer. ReadConsoleOutputAttribute Copies a specified number of foreground and background color attributes from consecutive cells of a console screen buffer. ReadConsoleOutputCharacter Copies a number of characters from consecutive cells of a console screen buffer.
读文件
无法获取所有的窗口内容!
GetConsoleSelectionInfo
GetConsoleScreenBufferInfoReadConsoleOutput
Reads character and color attribute data from a rectangular block of character cells in a console screen buffer. ReadConsoleOutputAttribute
Copies a specified number of foreground and background color attributes from consecutive cells of a console screen buffer. ReadConsoleOutputCharacter
Copies a number of characters from consecutive cells of a console screen buffer.
b.exe
c.exe
d.exe结果只能提取到这些exe的执行结果,而无法提取到
b.exe
c.exe
d.exe
这些信息。
可以使用namedpipe进行通讯。如果不是你写的,用下面的方式可能可以。
system("a.bat>output.txt")'
然后再去分析output.txt的内容。