DWar didn't write this code I did. What are you trying to use it for? And how did you try to implement it?
The original use for this code is for a DLL that is injected into a game and to be used once loaded in memory.
--Edit--
Ok weird, I replied just now because I just now got an email notification about a thread reply that I now noticed was in 2018? Anyway...