G
Guest
Hi guys,
I'm trying to figure out a way to do reflection on structs which are in a
legacy c++ header file. Basically I want to write a C++/CLI program that lets
me edit the binary data in the structs, but there are many of these structs
so it has to be automated. Also I do not want to have to modify the legacy
struct definitions.
Firstly if I simply include the .h file then none of the structs appear in
the assembly. So I guess first of all I must do a hack where an instance of
each of the structs in created so that it appears in the assembly.
Unfortunately when I look using reflector I see that the assembly still
dosnt really 'know' anything about these structs. The offsets for the fields
are basically hard coded into the accessing code. There is no struct with
named fields accessble for reflection in the assembly.
Can anyone give me some ideas on how to accomplish what im trying to do?
(find out layout of legacy c++ structs without modifying the source file).
Thanks
I'm trying to figure out a way to do reflection on structs which are in a
legacy c++ header file. Basically I want to write a C++/CLI program that lets
me edit the binary data in the structs, but there are many of these structs
so it has to be automated. Also I do not want to have to modify the legacy
struct definitions.
Firstly if I simply include the .h file then none of the structs appear in
the assembly. So I guess first of all I must do a hack where an instance of
each of the structs in created so that it appears in the assembly.
Unfortunately when I look using reflector I see that the assembly still
dosnt really 'know' anything about these structs. The offsets for the fields
are basically hard coded into the accessing code. There is no struct with
named fields accessble for reflection in the assembly.
Can anyone give me some ideas on how to accomplish what im trying to do?
(find out layout of legacy c++ structs without modifying the source file).
Thanks