You could just use the latest version of Detours, what are you are doing looks messy to me.
Hey, it compiles! Ship it!