IOService::requestTerminate doesn't work.

I use IOService's requestTerminate method to control built-in camera in macOS.
I remember that same code works till 10.15.4.
But it doesn't work anymore after later version than 10.15.5.
Is there anything changed in API?
I use method like this:

Code Block language
IOService* pService;
...
pService->requestTerminate(pService->getProvider(), kIOServiceRequired | kIOServiceAsynchronous);

Accepted Reply

I solve this problem via using another method terminateClient.

Code Block
IOService* pService;
...
pService->terminateClient(pService->getClient(), kIOServiceRequired | kIOServiceAsynchronous);

But I still wonder that IOService::terminateRequest is deprecated.

Replies

I solve this problem via using another method terminateClient.

Code Block
IOService* pService;
...
pService->terminateClient(pService->getClient(), kIOServiceRequired | kIOServiceAsynchronous);

But I still wonder that IOService::terminateRequest is deprecated.