How do 3DConnexion devices communicate with Solidworks?

Does anyone know how the movement of the a spacepilot or similar device is sent to solidworks and translated into movement? I know that there is an add-in you install and I presume this does it, but does anyone know what goes on behind the scenes, and is it possible to write your own add in to make any device manipulate the model in a similar way?

Thanks

SolidworksGeneral