Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/rust/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 当调用std::cout时,使用什么外部API?(窗口)_C++_Reverse Engineering - Fatal编程技术网

C++ 当调用std::cout时,使用什么外部API?(窗口)

C++ 当调用std::cout时,使用什么外部API?(窗口),c++,reverse-engineering,C++,Reverse Engineering,这是一个逆向工程问题 < Windows > 7,使用微软Visual C++ 2008编译二进制代码,当代码> STD::CUT被调用。在内部,使用什么API来写入数据?写入文件、写入文件、输出文件?我的目标是在std::cout上设置一个断点,在那里没有可用的源代码或调试符号。我相信它最终会使用WriteFile。您需要编译一个简单的hello world: #include <iostream> int main(int argc, char **argv) { std::

这是一个逆向工程问题


< Windows > 7,使用微软Visual C++ 2008编译二进制代码,当代码> STD::CUT被调用。在内部,使用什么API来写入数据?写入文件、写入文件、输出文件?我的目标是在std::cout上设置一个断点,在那里没有可用的源代码或调试符号。

我相信它最终会使用WriteFile。您需要编译一个简单的
hello world

#include <iostream>
int main(int argc, char **argv)
{
  std::cout << "Hello" << std::endl;
  return (0);
}
#包括
int main(int argc,字符**argv)
{

std::cout您可能想尝试将
std::cout
重定向到
std::stringstream
中。这非常适合于调试。请检查有关如何执行此操作的信息。@Space\u C0wb0y所讨论的二进制文件是机器代码。此时没有std::cout或std::stringstream这样的东西。这是一个黑客/反向问题。Just使用调试器遍历输出单个字符的过程。应该非常有用。编辑:当然,在测试程序上使用调试器来了解底层过程。哇,这太可怕了。它看起来好像一次只写出一个字节!@MSalters no。我确实发现WriteFile被调用了。