OMG you are noobs. You can port this code, you just have to port the hook address and the data of the hook + the datas of the routine.

It's easy ...