Hello,
I am tryying to get JournalRecord and JournalPlayback to work on my vista laptop but am finding that my Proc is not even being called.
I am not having any problem with my GetMessage hook but only with the Journal hook.
I have attached the relevant code.
Any help is greatly appreciated.

Code:
  1. Public Sub RecordMouse()
  2. 'Record the Mouse Events
  3.     If lHookID <> 0 Then Exit Sub
  4.     lMsgCountMax = 0
  5.     lMsgCount = 0
  6.     ReDim tEventList(0)
  7. 'Set an application hook to monitor for messages sent to this app
  8.     lAppHookID = SetWindowsHookEx(WH_GETMESSAGE, AddressOf GetMessageProc, App.hInstance, App.ThreadID)
  9. 'Set the Journal Hook to allow us to record all Mouse Movements
  10.     lHookID = SetWindowsHookEx(WH_JOURNALRECORD, AddressOf JournalRecordProc, 0&, 0&)
  11. End Sub
  12.  
  13. Private Function JournalRecordProc(ByVal Code As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  14. On Error GoTo LogError
  15.     If Code < 0 Then
  16. 'Pass this message along...
  17.         JournalRecordProc = CallNextHookEx(lHookID, Code, wParam, ByVal lParam)
  18.     Else
  19. 'Grab the Event Message Structure
  20.         CopyMemory tEVENTMSG, ByVal lParam, Len(tEVENTMSG)
  21. 'Only record MOUSE_MOVE events
  22.         If tEVENTMSG.message = WM_MOUSEMOVE Then
  23.             lMsgCountMax = lMsgCountMax + 1
  24.             ReDim Preserve tEventList(lMsgCountMax)
  25.             tEventList(lMsgCountMax) = tEVENTMSG
  26.         End If
  27.         JournalRecordProc = 0
  28.     End If
  29. Exit Function
  30. LogError:
  31. Debug.Print "Error in JournalRecordProc()"
  32. End Function
  33.  
  34. Private Function GetMessageProc(ByVal Code As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  35. Dim tMSG As MSG
  36. Dim Rec As Long
  37.     If Code < 0 Then
  38. 'Pass the message along...
  39.         GetMessageProc = CallNextHookEx(lAppHookID, Code, wParam, ByVal lParam)
  40.     Else
  41. 'Grab the MSG structure
  42.         CopyMemory tMSG, ByVal lParam, Len(tMSG)
  43.         Select Case tMSG.message
  44.             Case WM_CANCELJOURNAL
  45. 'An external process has requested us to stop this operation
  46.                 Call UnhookWindowsHookEx(lHookID)
  47.                 lHookID = 0
  48.         End Select
  49.     End If
  50. 'JournalRecordProc Code, wParam, lParam
  51. End Function
  52.  
  53. Public Sub PlayBackMouse()
  54. 'Playback the Journal Recorded with JournalRecord
  55.     If lHookID <> 0 Then Exit Sub
  56.     lMsgCount = 1
  57.     tEVENTMSG = tEventList(1)
  58. 'Set an application hook to monitor for messages sent to this app
  59.     lAppHookID = SetWindowsHookEx(WH_GETMESSAGE, AddressOf GetMessageProc, App.hInstance, App.ThreadID)
  60.     lHookID = SetWindowsHookEx(WH_JOURNALPLAYBACK, AddressOf JournalPlaybackProc, 0&, 0&)
  61. End Sub