STDAPI DllGetClassObject( IID const & rclsid, IID const & riid, void ** ppv ) { static ClassFactory<Profiler> classFactory; return (CLSID_PROFILER == rclsid) ? classFactory.QueryInterface( riid, ppv ) : E_OUTOFMEMORY; }
STDAPI DllGetClassObject(REFCLSID clsid, REFIID riid, void** ppv) { ClassFactory *pFactory = NULL; HRESULT hr = CLASS_E_CLASSNOTAVAILABLE; // Default to failure // Find an entry in our look-up table for the specified CLSID. for (DWORD index = 0; index < g_numClassFactories; index++) { if (*g_ClassFactories[index].pclsid == clsid) { // Found an entry. Create a new class factory object. pFactory = new ClassFactory(g_ClassFactories[index].pfnCreate); if (pFactory) { hr = S_OK; } else { hr = E_OUTOFMEMORY; } break; } } if (SUCCEEDED(hr)) { hr = pFactory->QueryInterface(riid, ppv); } SAFE_RELEASE(pFactory); return hr; }
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppvObject) { if ( nullptr == ppvObject ) { return E_INVALIDARG; } *ppvObject = nullptr; if ( !IsEqualCLSID(rclsid, CubeMelon::CLSID_Component) ) { return CLASS_E_CLASSNOTAVAILABLE; } if ( IsEqualIID(riid, IID_IClassFactory) ) { static ClassFactory factory; return factory.QueryInterface(riid, ppvObject); } else { return E_NOINTERFACE; } }
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) { if (IsEqualCLSID(rclsid, CLSID_Smiley)) { ClassFactory<TinySmiley> *cf = new ClassFactory<TinySmiley>(); return cf->QueryInterface(riid, ppv); } *ppv = NULL; return CLASS_E_CLASSNOTAVAILABLE;; }
STDAPI DllGetClassObject(const CLSID& clsid, const IID& iid, void** ppv) { if (clsid != EQUALIZERAPO_POST_MIX_GUID && clsid != EQUALIZERAPO_PRE_MIX_GUID) return CLASS_E_CLASSNOTAVAILABLE; ClassFactory* factory = new ClassFactory(); if (factory == NULL) return E_OUTOFMEMORY; HRESULT hr = factory->QueryInterface(iid, ppv); factory->Release(); return hr; }
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppReturn) { *ppReturn = 0; if (!IsEqualCLSID(SHELLEXT_GUID, rclsid)) return CLASS_E_CLASSNOTAVAILABLE; ClassFactory *fac = new ClassFactory(); if (fac == 0) return E_OUTOFMEMORY; HRESULT result = fac->QueryInterface(riid, ppReturn); fac->Release(); return result; }
// Returns a class factory to create an object of the requested type STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) { HRESULT hr = CLASS_E_CLASSNOTAVAILABLE; if (IsEqualCLSID(CLSID_DDShellExt, rclsid)) { hr = E_OUTOFMEMORY; ClassFactory *pClassFactory = new ClassFactory(); if (pClassFactory) { hr = pClassFactory->QueryInterface(riid, ppv); pClassFactory->Release(); } } return hr; }
HRESULT __stdcall DllGetClassObject( REFCLSID objGuid, REFIID riid, void **ppv ){ *ppv = NULL; if( IsEqualCLSID( objGuid, CLSID_OraHandler ) ){ ClassFactory *factory = new (std::nothrow) ClassFactory(); if( !factory ) return E_OUTOFMEMORY; factory->AddRef(); HRESULT hr = factory->QueryInterface( riid, ppv ); factory->Release(); return hr; } else return CLASS_E_CLASSNOTAVAILABLE; }
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) { using namespace kritashellex; ClassFactory::Type type; if (IsEqualCLSID(CLSID_KritaThumbnailProvider, rclsid)) { type = ClassFactory::CLASS_THUMBNAIL; } else if (IsEqualCLSID(CLSID_KritaPropertyHandler, rclsid)) { type = ClassFactory::CLASS_PROPERTY; } else { return CLASS_E_CLASSNOTAVAILABLE; } ClassFactory *pClassFactory = new (std::nothrow) kritashellex::ClassFactory(type); if (!pClassFactory) { return E_OUTOFMEMORY; } HRESULT hr = pClassFactory->QueryInterface(riid, ppv); pClassFactory->Release(); return hr; }