如何从DLL中写入浮点值

How do I write a float value from within a DLL?

本文关键字:DLL      更新时间:2023-10-16

我试过使用memset,但它似乎只完全取代了代码。我该怎么做呢?下面是我当前的代码:

#include <iostream>
#include "memory.h"
DWORD paranoid = sigScan("xFFx15xE0x11x00x01xFFx15xDCx11x00x01","xxxxxxxxxxxx");
void initiate() {
    if (paranoid) {
        std::cout<<"Paranoid: "<<paranoid<<std::endl;
        // i need to make the DWORD address returned by sigScan have a float value of -1
    } else {
        MessageBoxA(GetActiveWindow(),"Error: sigscan failed (paranoid)","Error",0);
    }
}

很奇怪,但如果我没理解错的话,那么这就可以了

*(float*)paranoid = -1;

如果我没有正确理解您的意思,那么这可能会使您的程序崩溃。

相关文章:
  • 没有找到相关文章