Affects all games based on version 18 and 19 which includes
the chinese versions
This code is based on the toastertools implementation.
Credits to the original authors.
This module serves as a general base for any d3d9 hooks to be
implemented. It implements the IRP pattern like the iohook module.
This allows us to create irp handlers which can be chained, easier
structured and maintained compared to static IAT hooking. The latter
was the previous solution and did not work out well anymore for IIDX
which grew regarding d3d9 features.