Launching and terminating thread from CP... Need help???


We are working on wrapped credential providers, have implemented the
CPs successfully without any fuss but the problem is that we spawn a
thread from our CP in SetUsageScenario(), but when we kill the thread
through a call to ExitThread(), it simply hangs the whole "Login
The exact test case is when we press cancel button on the CP screen
after switch user button, then Unadvice() is called and at that
particular time we need to terminate the thread that we have created,
when this is done the application hangs then and there...
Can any body help me out...

Second thing is that, does any body know how to generate CAD (Ctrl
+Del) event in Windows Vista programmatically, the reference to API
will be a great help.

Kind regards,