Read and implement the threading model correct as described in
Understanding Threading Issues. Pay attention to the different threading appartment models which are cumbersome. Follow that article because it is the only way it will work.
Good luck - you will need it.
tip: it may better to recreate the project with the wizard to get the correct settings and IDL files. Long times ago I came to that experience after fiddling for a while.