![]() |
Add Structure |
![]() |
Edit Structure Properties |
![]() |
Remove Selected Structure(s) |
![]() |
Remove All Structures |
![]() |
Expand All Structures |
![]() |
Collapse All Structures |
![]() |
Save Structures List: save current strutures list into a file for future reloading |
![]() |
Reload Structures List: reload a saved list of structures |
![]() |
Open Structures Folder |
![]() |
Open Defines Folder |
![]() |
Reload Structures And Defines Definitions |
![]() |
Specific cases :
As file name can't have ":", "<" or ">" symbols, user type file name must follow the following replacement rules - for "Class::Type" type, a "Class..Type.txt" file will be searched ( ":" replaced by ".") - for "TemplateType<MyType>", "TemplateType(MyType).txt" file will be searched ( "<" replaced by "(" and ">" by ")") Notice : You still can let "Class::Type" or "TemplateType<MyType>" type in your definitions content, the translation is done by Helium Hex Editor. Only text file name needs to be affected |
#include : Include other user type files with #include
typedef union { DWORD u1; BYTE u2; BYTE u3; }UNION_1; typedef struct { UNION_1 u; DWORD* pdw; BYTE bArray[5]; char* str; DWORD dwArray[2][2]; DWORD dw; }STRUCT_1; typedef STRUCT_1* PSTRUCT_1; enum enum1 { FOO_1 = 0x123, FOO_2, FOO_3 = 2*FOO_1 }; enum enum2 { FOO_21 = 0x123, FOO_22, FOO_23 = 0x456 }; typedef struct { STRUCT_1 S[2]; DWORD dw1, dw2; /* some comment * */ union _u { DWORD LSB:1, b2:1, b3:1, b4:1, unused:27, MSB:1; DWORD RawValue; // 0x8000000A = 1000 0000 0000 0000 0000 0000 0000 1010 }U; DWORD dw4; struct Date { DWORD nWeekDay : 3; // 0..7 (3 bits) DWORD nMonthDay : 6; // 0..31 (6 bits) DWORD : 0; // Force alignment to next boundary. DWORD nMonth : 5; // 0..12 (5 bits) DWORD nYear : 8; // 0..100 (8 bits) DWORD Foo : 30; // just to force another DWORD }d; enum1 e1[2]; enum2 e2; }STRUCT_2,*PSTRUCT_2;
#pragma pack(push) #pragma pack(1) typedef struct { BYTE b; WORD w; DWORD dw; }STRUCT1; #pragma pack(pop)
struct __tagVARIANT { #pragma next_field_define_values_file("VARTYPE_Defines.txt") VARTYPE vt; WORD wReserved1; WORD wReserved2; WORD wReserved3; ... }when decoding something like VT_UI4 will displayed instead of 19
#pragma next_enum_size(1) typedef enum { E1_value0=0, E1_value1, E1_value2, }ENUM1; #pragma next_enum_size(2) typedef enum { E2_value0=0, E2_value1, E2_value2, }ENUM2;
typedef struct { WORD w; DWORD dw; STRUCT2 Struct2; // in this case, Struct2 will be parsed as a big endian struct }STRUCT1;
#pragma next_struct_endianness(big_endian,true) typedef struct { WORD w; DWORD dw; STRUCT2 Struct2; // in this case, Struct2 will be parsed as a big endian struct }STRUCT1; All the fields and nested structs of the previous struct will be parsed as big endian #pragma next_struct_endianness(big_endian,false) typedef struct { WORD w; DWORD dw; STRUCT2 Struct2; // in this case, Struct2 will be parsed as a little endian struct, // even if all other fields are parsed as big endian fields }STRUCT3;
typedef struct { WORD w; #pragma next_field_must_match(2) DWORD dw; STRUCT2 Struct2; }STRUCT1;The background color of dw is green if dw==2, red else.
typedef struct { ... #pragma next_field_must_match(2) DWORD dw; #pragma next_field_must_match("Some String") LPCSTR String; #pragma next_field_must_match("Some String") LPWCSTR wString; ... };
typedef struct { ... #pragma next_field_must_match_one_of(1,8,64,128,256,512,1024,2048) DWORD dw; #pragma next_field_must_match_one_of("AnsiString1","AnsiString2","AnsiString3") CHAR String[256]; #pragma next_field_must_match_one_of("UnicodeString1","UnicodeString2","UnicodeString3") WCHAR wString[256]; ... };
typedef struct { ... #pragma next_field_must_be_less_or_equal(80) DWORD dw; #pragma next_field_must_be_less_or_equal(0x28) DWORD dw2; ... };
typedef struct { ... #pragma next_field_must_be_greater_or_equal(3) DWORD dw; #pragma next_field_must_be_greater_or_equal(0x28) DWORD dw2; ... };
typedef struct { ... #pragma next_field_must_be_between_inclusive(10,56) DWORD dw; #pragma next_field_must_be_between_inclusive(2.7,2.95) double dbl; #pragma next_field_must_be_between_inclusive(2.5,4.5) float f; ... };User Defines
![]() |
Only integer defines are supported (no floats or strings support) |
#define FOO1 45 #define FOO2 1024 #define FOO3 32 #define FOO4 (FOO1+FOO3) #define FOO5 3 #define FOO6 8 #define FOO11 (FOO1 +1 -5*(FOO1-FOO2) +( (1+ FOO2/FOO1) *2)) #define FOO12 (FOO1 | FOO3) #define FOO13 (~FOO3) #define FOO14 (FOO2^FOO1) #define FOO15 ((FOO2<FOO1) ? FOO3 : 7)