同様の投稿がいくつか見つかりましたが、私の特定の問題を対象とするものはありませんでした。
外部プロセス メモリからデータ構造を読み込もうとしています。私は OpenProcess を使用してハンドルを取得しました。メモリを読み取るための関数はかなりきれいですが、読み取る最初の構造体 (0xC0 バイトである必要があります) を組み立てた後、sizeof(structure) を呼び出してその値を 2 倍にしています。役立つ場合は、構造を以下に示します。誰かが私を正しい方向に向けてくれることを願っています。
ありがとう
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;
};