I don't get garbage. If I use meep->vkCode, lets say I get 2200340, when I use meep->scanCode, I get 2200344 and when I use meep->flags, I get 2200348.
Just as a test does the snippet I provide produce the same result? The reason I ask, is because the syntax you are using to access the struct member variable via its pointer is correct and you should therefore get the actual value of the 'vkCode' and not the garbage you're reporting (you may just be getting the rubbish that 'buffer' contains).
I am not at my home computer at the moment, but my program looks something like this:
DLL file, LowLevelKeyboardProc, case HC_ACTION:
GUI application, WindowProcedure, case WM_KEYBDHOOK:
NewItem function (ints):
KBDLLHOOKSTRUCT *meep = (KBDLLHOOKSTRUCT *) lParam;
And then, an other function shows the whole data array in a list view control. Uses itoa() to convert the integer to a string.