Input from devices

Hi all,
I'm importing a VC++.net developed application into SW through anAdd-In.
So the problem is that I don't know the way to run the applicationand manage it during a SW working session, the old applicationacquires data from a device.
Has anyone suggestions for proceeding?
Have I to implement a multithread application?
In this case does anyone have some references?

Cheers,
D.G.SolidworksApi macros