找到了一些类似的帖子,但没有一个针对我的具体问题。
我正在尝试从外部进程内存中读取数据结构。我已经使用 OpenProcess 来获取句柄,并且我的读取内存的函数非常简洁,但是在组装了要读取的第一个结构(应该是 0xC0 字节)之后,我正在调用 sizeof(structure) 并获得两倍的值。如果有帮助,结构如下。希望有人能指出我正确的方向。
谢谢
struct BattleListEntry
{
    int CID;
    wstring Name;
    byte* unknown[16];
    int z, y, x;
    byte* unknown2[8];
    int Direction;
    int TimeLastMoved;
    int rnd3, rnd4, rnd5, rnd6;
    int isWalking;
    byte* unknown3[12];
    int Outfit1, Outfit2, Outfit3, Outfit4, Outfit5;
    byte* unknown4[24];
    int HpPct; // 40 * 4 from start
    int rnd7;
    int rnd8;
    //byte* unknown5[12];
    int rnd9, rnd10, rnd11, rnd12, rnd13, rnd14, rnd15, rnd16, rnd17, rnd18;
};