Instead of defaulting to IntPtr.Zero, allow the user to set a callback object when creating unmanaged hooks since you could for example create an object with an unmanaged export and then use the address from that call to pass to the hook creation to be used inside the native detour function.
Instead of defaulting to IntPtr.Zero, allow the user to set a callback object when creating unmanaged hooks since you could for example create an object with an unmanaged export and then use the address from that call to pass to the hook creation to be used inside the native detour function.