This section illustrates a complete hook sample program. Several parts of this program are explained in "Using Hooks".