为什么我看不到字符串?

Why cant i see the string?

本文关键字:字符串 看不到 我看 为什么      更新时间:2023-10-16

我知道这段代码很草率,但我想知道为什么当我使用 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,您缺少第二个"="。这也意味着从这一点来看,procIDNULL.

其余代码呢?您能告诉我们Cursor的定义是什么样的,您是如何实现operator<<的吗?