It's worth pointing out that detouring functions is entirely unsupported in Win32. If you do it, Watson will automatically discard crash dumps that patch Microsoft libraries (because it can no longer tell if you crashed because you screwed up the internal Microsoft library state) and they won't make any attempt to ensure that you program continues to work past any given Windows Update or change of the OS.

As soon as you begin detouring functions, you live entirely on your own.