wow, sounds like you are on the way to a fully working solution!
i totally understand your choice not to dig into the dll, your solution is working perfectly well and as you said its maybe even faster
the buttons are working fine, but it would be cool to get two events for a keypress:
A_DOWN on press and A_UP on release.