I dont understand why he derefs it at all, you can simply use a pointer directly like this:
Code:
KBDLLHOOKSTRUCT *pKbdStruct = (KBDLLHOOKSTRUCT*)lParam;
pKbdStruct->...