The C# example is good but it's missing the fact that you can marshal the keyboard event information structure pointer to an instance of that structure to get the actual keys pressed.  KBDLLHOOKSTRUCT thekeyvalues = new KBDLLHOOKSTRUCT();                 Marshal.PtrToStructure(lparam, thekeyvalues);   