We avoid using CoCreateInstance inside windowscodecs because COM may not be initialized. Applications can use WICCreateImagingFactory_Proxy to get WIC interfaces without initializing COM.
I'm guessing this is for wmphoto. My suggestion would be to use a different create_instance implementation in that library, maybe just a wrapper around CoCreateInstance. We may need to reorganize things so we can share the correct set of functions.