in reply to Re^4: Win32 Keyboard hook in perl
in thread Win32 Keyboard hook in perl

Eh, what?!? No, a callback expects a pointer to some raw machine code (generally compiled C), which the CPU can then execute directly. Pure Perl won't do, you'll need an interface layer written in XS.

I looked over CPAN, and found Win32::API::Callback, which probably can be used to get the desired effect. If it doesn't crash. :)

Replies are listed 'Best First'.
Re^6: Win32 Keyboard hook in perl
by Mr. Muskrat (Canon) on Sep 10, 2004 at 19:24 UTC

    I was speaking of the underlying API but I should have said that. I probably should have left it at "The API expects that position to hold a pointer to a callback function."