Recent

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

jamie

  • Hero Member
  • *****
  • Posts: 6090
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. >:(
The only true wisdom is knowing you know nothing

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • 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: 3944
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 ;) 
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

jamie

  • Hero Member
  • *****
  • Posts: 6090
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.
The only true wisdom is knowing you know nothing

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 1312
    • 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)

 

TinyPortal © 2005-2018