2147483648

Finally figured out my problem:

WTInfo(WTI_EXTENSIONS + extIndex_ExpKeys, EXT_MASK, &lExpKeys_Mask);

If that returns, say, 0 to the lExpKeys_Mask variable, rather than, say, 2147483648, the entire thing (recognising packets from the buttons on a Wacom tablet) won’t work.

Once I’ve sorted out the rest of these API bugs, I’m definitely putting the code up somewhere. Thanks to the fuck all WinTab SDK, documentation and examples, my coding process has basically involved hacking together two (that is, all those present on the internet) examples. Slow going.