Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
// 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;
}
Ejemplo n.º 4
0
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;
}
Ejemplo n.º 5
0
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;
}