Woohoo!!! Finally, after all these years, (ok, year. I'm serious, I've been working on it for a year) I finally got it to work! I learnt that there are two types of xinput: x64 and x86. I was loading the x64 dll, which somehow isn't compatible with the hardware. But when I tried x86, everything just went smoothly!
Thanks everyone for their contribution!! Yay!!!!
Thanks everyone for their contribution!! Yay!!!!