These are the things I have in C.
IMAGE_OPTIONAL_HEADER *pe_optional(pe_ctx_t *ctx);
typedef struct {
uint16_t Magic;
}IMAGE_OPTIONAL_HEADER_32;
typedef struct {
uint16_t type;
IMAGE_OPTIONAL_HEADER_32 *_32;
}IMAGE_OPTIONAL_HEADER;
In c language to access Magic variable, I did this and it worked.
IMAGE_OPTIONAL_HEADER *optional = pe_optional(&ctx);
printf(ā%d \nā, optional->_32->Magic)
But how to access the same in golnag? I did
optional := pe_optional(&ctx);
fmt.Println(optional._type) // worked for me
fmt.Println(optional._32.Magic) // did not work for me: HOW TO ACCESS MAGIC
VARIABLE
Doubt is : how to do I access `Magic` variable in go?
Thanks
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.