This is a reverse engineering question.
On Windows 7 with a binary compiled using Microsoft Visual C++ 2008, when std::cout is called. Internally, what API is used to write the data? WriteFile, fwrite, ConsoleOut? I am aiming to set a breakpoint on std::cout where no source or debugging symbols are available.
I believe it’ll end up using WriteFile. It you compile a simple
hello world:…and then do
dumpbin /imports hello.exe, you get a list of the external functions it uses, you’ll find that it imports bothWriteFileandWriteConsoleW, but if memory serves, the latter is only used for printing some standard library error messages, not for standard output.