[API]
GetWindowLongA
GetWindowLongW
CallWindowProcAnsi
CallWindowProcWide

[CODE]
Public Function HookedWindowProc(ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  Dim xLong1 As Long

  #If Unicode Then
    If IsUnicode Then
      xLong1 = GetWindowLongW(hWnd, -21&)
      If Not xLong1 = 0& Then
        HookedWindowProc = CallWindowProcWide(xLong1, hWnd, Msg, wParam, lParam)
        End If
      Else
      xLong1 = GetWindowLongA(hWnd, -21&)
      If Not xLong1 = 0& Then
        HookedWindowProc = CallWindowProcAnsi(xLong1, hWnd, Msg, wParam, lParam)
        End If
      End If
    #Else
    xLong1 = GetWindowLongA(hWnd, -21&)
    If Not xLong1 = 0& Then
      HookedWindowProc = CallWindowProcAnsi(xLong1, hWnd, Msg, wParam, lParam)
      End If
    #End If
  End Function
