为什么我看不到字符串?
Why cant i see the string?
我知道这段代码很草率,但我想知道为什么当我使用 ReadProcessMemory(( 函数时,我看不到存储在相关地址中的字符串。
//If the game window is open then this function grabs the process ID.
if(FinderCheck)
{
DWORD procID;
GetWindowThreadProcessId(hwnd, &procID);
//All so access you can read and write to process memory.
HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS,FALSE,procID);
if(procID = NULL)
{
cout << "Error: Failed to Obtain Process ID" << endl;
}
else
{
while(true)
{
//To read the process memory this line writes the memory data to buffer
//Remember to change the address every time you boot the process or it will not work.
ReadProcessMemory(handle, (PBYTE*)0xDC8F1AA904,&Cursor,sizeof(Cursor),0);
cout << Cursor << endl;
cout << "Test" << endl;
Sleep(500);
}
}
if(procID = NULL)
可悲的是,这个 if 语句的计算结果总是为 false,您缺少第二个"="。这也意味着从这一点来看,procID
NULL
.
其余代码呢?您能告诉我们Cursor
的定义是什么样的,您是如何实现operator<<
的吗?
相关文章:
- 我不断收到 [错误] ID 返回 1 退出状态错误,但看不到问题所在
- 看不到文件'SDL2.lib'
- WSL 看不到环境变量
- 为什么我的 FreeRTOS 任务看不到类成员?
- Google Colab 看不到 .so 文件
- 派生类看不到基类成员
- 为什么我看不到字符串?
- CMake 看不到SDL2_PATH环境变量 (Windows)
- OpenMP 任务看不到共享变量的更改
- handleMessage看不到我的类和函数
- 为什么 connect() 函数看不到插槽?
- 模板类看不到继承的模板成员
- 为什么即使链接器找到目标文件,我的程序也看不到函数定义?
- 将 somedialog.h 包含在项目的其他部分中会使编译器看不到 ui_somedialog.h
- SFML - 代码::块看不到 sfml 图形(等)文件
- CMake 看不到源文件,找不到 #includes
- ifstream在OSX上看不到新内容
- C++概念看到我的类型的函数,但看不到 std::vector 的函数
- unique_ptr看不到派生类的自定义构造函数
- 我的程序执行了正确的#次循环,但是我看不到字符串变量