I want to learn how to write USB drivers for windows

title says it all, I want to learn how to write usb drivers, I have an unknown device on windows (x360 wireless dongle for x360 controller)

how do start writing the driver and working with it.

You go to microsoft and steal their source code

Which dongle is it? this one's officially supported

its not from microsoft, its a 3rd party adapter, what I want to do, is write a simple driver which essentially calls the microsoft driver

Seems like if it were that simple someone would have done it already

Unless your adapter is an exact replica of the official microsoft adapter, then it will not work.

what you could try is downloading the official M$ dongel driver ".inf" file and change the hardware id's to match your dongel.

that said the chipset of the dongel your using usually needs to be made by the same company for it to work.

keep in mind the brand name on the box isn't the same as the company that made the chipset.

i.e. if you see linksys on a wireless adapter chances are it was manufactured by mediatek or realtek.

well if I manually tell it to use the Microsoft driver it works like a charm, so I think it is.