written for http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_21898076.html
This appears to demonstrate the usage of the APIHook madcodehook function in hooking createprocess.

Source Code