> A few issues identified in TimerHook.cs;
1) the timerId generated is never stored back to the class _timerId field. Therefore, in Detach(), a zero timerId is passed to KillTimer() and GlobalDeleteAtom().
Subsequently, your timer hook never gets released, and so this can cause the WinAPI to try calling into your managed callback even after the CLR has been unloaded. The callback will be a released memory address after the CLR unload, and so a potential crash situation.
2) GlobalAdd