C++ WinRT caches agile factories. When the factory is remote, implemented in a win32 service, and that service is shutdown, calls on it will throw “RPC server is unavailable”. Since these services will auto-start attempts to re-bind will succeed.
The factory cache should detect this case, release the bad factory and try again.
This is similar to the support in event delegates that detect RPC server is unavailable and remove the delegate from the event collection.