Recent

Author Topic: setwindowshookex Incompatible type for arg (SOLVED)  (Read 1352 times)

jamie

  • Hero Member
  • *****
  • Posts: 2162
Re: setwindowshookex Incompatible type for arg (SOLVED)
« Reply #15 on: November 16, 2019, 11:04:49 pm »
Yeah no problem, I'll most likely get castrated for giving you that bit of info. >:(
Number 1 at blue screen app creations!

PascalDragon

  • Hero Member
  • *****
  • Posts: 716
  • Compiler Developer
Re: setwindowshookex Incompatible type for arg (SOLVED)
« Reply #16 on: November 17, 2019, 10:53:58 am »
Yeah no problem, I'll most likely get castrated for giving you that bit of info. >:(
Why? It was one of the two solutions suggested by me as well.

440bx

  • Hero Member
  • *****
  • Posts: 1272
Re: setwindowshookex Incompatible type for arg (SOLVED)
« Reply #17 on: November 17, 2019, 11:39:55 am »
Why? It was one of the two solutions suggested by me as well.
Because he bought cheap real estate, consequently he gets bad schools and extreme neighbors ;) 
using FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 64bit.

jamie

  • Hero Member
  • *****
  • Posts: 2162
Re: setwindowshookex Incompatible type for arg (SOLVED)
« Reply #18 on: November 17, 2019, 05:24:38 pm »
You may have a point there but the real-estate here isn't cheap although we just don't seem to use any of our tax money at work.. I think it has something to do with over paid gov workers and too many free lunch programs.
Number 1 at blue screen app creations!

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 680
    • Lebeau Software
Re: setwindowshookex Incompatible type for arg
« Reply #19 on: November 22, 2019, 03:58:59 am »
Indeed, and you can pass self  as the lparam.

No, you can't, because SetWindowsHookEx() does not allow you to pass any user-defined values to its hooks.  So you will have to use either a global variable or a thunk to get the Self pointer into the hook procedure.
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)