title: Why did SetWindowsHookEx with the WH_JOURNALRECORD hook type always return 0?
body: <pre><code>_ProcDlgMain PROC uses ebx edi esi hWnd,wMsg,wParam,lParam
  
      mov eax,wMsg
      .if eax ==  WM_CLOSE
          invoke  UnhookWindowsHookEx,hHook
          invoke  EndDialog,hWnd,NULL
      .elseif eax ==  WM_INITDIALOG
          push    hWnd
          pop hWinMain
          invoke AddDebugPrivilege
          invoke  SetWindowsHookEx,WH_JOURNALRECORD,addr HookProc,hInstance,NULL
          .if eax
              mov hHook,eax
          .else
              invoke  EndDialog,hWnd,NULL
          .endif
      .else
          mov eax,FALSE
          ret
      .endif
      mov eax,TRUE
      ret
  _ProcDlgMain ENDP
  
  start:  
      invoke  GetModuleHandle,NULL
      mov hInstance,eax
      invoke  DialogBoxParam,eax,DLG_MAIN,NULL,offset _ProcDlgMain,NULL
      invoke  ExitProcess,NULL
  end start
  </code></pre>
  
  <p>Does anybody know why the <code>SetWindowsHookEx</code> function returns <code>0</code>?</p>