Skip to content

How to apply patterns? #365

Answered by xyx0826
xyx0826 asked this question in Get Help
Discussion options

You must be logged in to vote

Never mind! Sorry. Looked at #237 and got my answer:

After declaring a struct in the pattern, the struct has to be "instantiated" i.e. placed at an offset for ImHex to pick it up. I nailed the declaration but wasn't aware of the second part. This is what the solution looks like:

struct module_header {
    u32 magic;
    u32 version;
    // ...
};

module_header header @0x00;  // This is important!

I went looking for a placement button because I was in a different mindset.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by xyx0826
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant