CoImpersonateClient and Worker Threads
I have an existing COM service which runs under the local system account as a service. I开发者_StackOverflowt's sole purpose when a client connects is to run a third party function with impersonation. i.e. something like;
void service_client()
{
CoImpersonateClient();
tfp(); //third_party_function
...
}
This has all worked well for years but now tfp() has changed in that whilst remaining synchronous overall it internally spawns worker threads which pick up the identity of local system account instead of the impersonated client which causes the function to fail.
Is there a way of working around this, given that I can't modify tfp()
Thanks.
精彩评论