ub

'Patch the code offset with the relative address to the target address
Private Sub PatchRel(nOffset As Long, nTargetAddr As Long)
  Call WinSubHook.CopyMemory(ByVal (nWndProc + nOffset), nTargetAddr - nWndProc
   - nOffset - 4, 4)
End Sub

'Return -1 if we're running in the IDE or 0 if were running compiled
Private Function InIDE() As Long
  Static Value As Long
  
  If Value = 0 Then
    Value = 1
    Debug.Assert InIDE() Or True                          'This line won't
     exist in the compiled app
