A template is a dialog box
that provides means for editing custom data structures in a more comfortable and
error-preventing way than raw hex editing does. The data may originate from a file, from
disk sectors, or from virtual memory. Especially when editing databases, you may prefer to
define a custom template for ease of access to the records.
A template definition is stored in a
text file. The template editor enables you to write template definitions and
offers syntax checking. A template definition mainly contains variable declarations, that
are similar to those in source code of programming languages. The syntax is explained in
detail in Appendix A of the user manual.
The supported data types include all the common integer,
floating-point and boolean variants, five date types, hex values, binary, characters, and
string types. Arrays of both single variables and groups of variables can be used.
The ability to move freely
forwards and backwards within the data makes using templates particularly flexible:
- The same variable may be interpreted and manipulated in several ways.
- Irrelevant data sections can be skipped.
The template manager lists all text files in
the WinHex directory that contain template definitions. The title of the template along
with a description, the filename, and the date and time of the last modification is shown.
Click the Apply button to display a template using the selected template definition for
the data in the current editor window at the current position. You may also create a new
template definition, delete or edit an existing one.
WinHex comes with several sample templates, particularly
such that enhance access to the FAT file system data structures.