STDMETHODIMP CTestSuiteItemCollection::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_ITestSuiteItemCollection
	};
	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
Пример #2
0
STDMETHODIMP CVisWindow::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_IVisWindow,
	};

	for (int i=0;i<sizeof(arr)/sizeof(arr[0]);i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid)) return S_OK;
	}
	return S_FALSE;
}
Пример #3
0
STDMETHODIMP CPigMissionParams::InterfaceSupportsErrorInfo(REFIID riid)
{
  static const IID* arr[] = 
  {
    &IID_IPigMissionParams,
  };
  for (int i = 0; i < sizeofArray(arr); ++i)
  {
    if (InlineIsEqualGUID(*arr[i], riid))
      return S_OK;
  }
  return S_FALSE;
}
STDMETHODIMP CFusionUniversalProbeSetResultsCOM::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_IFusionUniversalProbeSetResults
	};

	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
STDMETHODIMP nsXPCDispTestNoIDispatch::InterfaceSupportsErrorInfo(REFIID riid)
{
    static const IID* arr[] = 
    {
        &IID_nsIXPCDispTestNoIDispatch,
    };

    for (int i=0;i<sizeof(arr)/sizeof(arr[0]);i++)
    {
        if (InlineIsEqualGUID(*arr[i],riid))
            return S_OK;
    }
    return S_FALSE;
}
Пример #6
0
STDMETHODIMP CProviderInfo::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&__uuidof(IProviderInfo)
	};

	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
Пример #7
0
STDMETHODIMP CProbeSetQuantificationDetectionDataCOM::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_IProbeSetQuantificationDetectionData
	};

	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
STDMETHODIMP CInternetFileManagerObject::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_IInternetFileManager,
	};

	for (int i=0;i<sizeof(arr)/sizeof(arr[0]);i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
Пример #9
0
STDMETHODIMP DispReel::InterfaceSupportsErrorInfo(REFIID riid)
{
   static const IID* arr[] =
   {
      &IID_IDispReel,
   };

   for (size_t i = 0; i < sizeof(arr) / sizeof(arr[0]); ++i)
   {
      if (InlineIsEqualGUID(*arr[i], riid))
         return S_OK;
   }
   return S_FALSE;
}
Пример #10
0
bool GetTargetPixelFormat(const GUID* pSourceFormat, GUID* pTargetFormat)
{
	*pTargetFormat = *pSourceFormat;

	for (size_t i = 0; i < _countof(g_WICConvert); ++i)
	{
		if (InlineIsEqualGUID(g_WICConvert[i].source, *pSourceFormat))
		{
			*pTargetFormat = g_WICConvert[i].target;
			return true;
		}
	}
	return false;
}
Пример #11
0
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
{
	HRESULT hr;
	RUGE::CInputClassFactory *pFactory;

	if (!InlineIsEqualGUID(rclsid, __uuidof(RUGE::CInputImpl))) return CLASS_E_CLASSNOTAVAILABLE;
	if (IsBadWritePtr(ppv, sizeof(void*))) return E_POINTER;
	*ppv=NULL;
	pFactory=new RUGE::CInputClassFactory;
	pFactory->AddRef();
	hr=pFactory->QueryInterface(riid, ppv);
	pFactory->Release();
	return hr;
}
Пример #12
0
STDMETHODIMP SOComWindowPeer::InterfaceSupportsErrorInfo(REFIID riid)
{
    static const IID* arr[] =
    {
        &IID_ISOComWindowPeer,
    };

    for (int i=0;i<SAL_N_ELEMENTS(arr);i++)
    {
        if (InlineIsEqualGUID(*arr[i],riid))
            return S_OK;
    }
    return S_FALSE;
}
STDMETHODIMP CLarrysOpenOfficeandStarOfficeIndexerObj::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_ILarrysOpenOfficeandStarOfficeIndexerObj
	};

	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
Пример #14
0
STDMETHODIMP CFusionTagValuePairTypeCOM::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_IFusionTagValuePairType
	};

	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
Пример #15
0
STDMETHODIMP DragPoint::InterfaceSupportsErrorInfo(REFIID riid)
{
   static const IID* arr[] =
   {
      &IID_IControlPoint,
   };

   for (size_t i = 0; i < sizeof(arr) / sizeof(arr[0]); i++)
   {
      if (InlineIsEqualGUID(*arr[i], riid))
         return S_OK;
   }
   return S_FALSE;
}
STDMETHODIMP CSolidworksCrawlPlugin::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* const arr[] = 
	{
		&IID_ISolidworksCrawlPlugin
	};

	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
STDMETHODIMP CIntelMediaServerConfig::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_IIntelMediaServerConfig
	};

	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
/////////////////////////////////////////////////////////////////////////////
// CHyperFeedStructureProviderEx
STDMETHODIMP CHyperFeedStructureProviderEx::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_IStructureProvider,
		&IID_IStructureProvider2
	};
	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
STDMETHODIMP CBondiWidgetPreference::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_IBondiWidgetPreference
	};

	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
Пример #20
0
STDMETHODIMP CEarthViewer::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* const arr[] = 
	{
		&IID_IEarthViewer,
		&IID_IEarthDispatch
	};

	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
Пример #21
0
STDMETHODIMP CDVCompare::InterfaceSupportsErrorInfo(REFIID riid)
{
	CResourceSwapper rs( _Module.m_hInstResource );

	static const IID* arr[] = 
	{
		&IID_ICommand
	};
	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
Пример #22
0
STDMETHODIMP CContextMenuHandler::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_IShellExtInit,
		&IID_IContextMenu
	};

	for (int i=0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
STDMETHODIMP
sbWindowsFormatter::QueryInterface(REFIID aIID,
                                   void** aInterface)
{
  // Validate arguments.
  if (IsBadWritePtr(aInterface, sizeof(void*)))
    return E_POINTER;

  // Initialize interface to null.
  *aInterface = NULL;

  // Return requested interface.
  if (InlineIsEqualGUID(aIID, IID_IUnknown))
    *aInterface = static_cast<IUnknown*>(this);
  else if (InlineIsEqualGUID(aIID, IID_sbIWindowsFormatter))
    *aInterface = static_cast<sbIWindowsFormatter*>(this);
  else
    return E_NOINTERFACE;

  // Add a reference to the interface.
  (static_cast<IUnknown*>(*aInterface))->AddRef();

  return S_OK;
}
STDMETHODIMP CComPolygon::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_IComPolygon,
        &IID_IAcadObject,
        &IID_IAcadEntity,
        &IID_IOPMPropertyExpander
	};
	for (int i=0;i<sizeof(arr)/sizeof(arr[0]);i++)
	{
		if (InlineIsEqualGUID(*arr[i],riid))
			return S_OK;
	}
	return S_FALSE;
}
Пример #25
0
STDMETHODIMP SOComWindowPeer::InterfaceSupportsErrorInfo(REFIID riid)
{
	static const IID* arr[] = 
	{
		&IID_ISOComWindowPeer,
	};

	for (int i=0;i<sizeof(arr)/sizeof(arr[0]);i++)
	{
#if defined(_MSC_VER) && (_MSC_VER >= 1300)
		if (InlineIsEqualGUID(*arr[i],riid))
#else
		if (::ATL::InlineIsEqualGUID(*arr[i],riid))
#endif
			return S_OK;
	}
	return S_FALSE;
}
Пример #26
0
STDMETHODIMP InterfaceUtilities::InterfaceSupportsErrorInfo(REFIID riid)
{
   try
   {
      static const IID* arr[] = 
      {
         &IID_IInterfaceUtilities,
      };
   
      for (int i=0;i<sizeof(arr)/sizeof(arr[0]);i++)
      {
         if (InlineIsEqualGUID(*arr[i],riid))
            return S_OK;
      }
      return S_FALSE;
   }
   catch (...)
   {
      return COMError::GenerateGenericMessage();
   }
}
Пример #27
0
HRESULT STDAPICALLTYPE 
ClassTableGetClassObject(COCLASS_ENTRY *pTable, 
                         REFCLSID rclsid, 
                         REFIID riid, void **ppv)
{
    HRESULT hr = CLASS_E_CLASSNOTAVAILABLE;
    *ppv = 0;
    if (pTable)
    {
        while (pTable->pclsid != &GUID_NULL)
        {
            if (InlineIsEqualGUID(*pTable->pclsid, rclsid))
            {
                if (pTable->pfnGetClassObject)
                    hr = pTable->pfnGetClassObject(riid, ppv);
                break;
            }
            pTable++;
        }
    }
    return hr;
}
HRESULT InterfaceTableQueryInterface(void * pThis, const INTERFACE_ENTRY * pTable, REFIID riid, void **ppv)
{
	if (::InlineIsEqualGUID(riid, IID_IUnknown))
	{
		// first entry must be an offset
		*ppv = (char*)pThis + pTable->dwData;
		reinterpret_cast<IUnknown *>(*ppv)->AddRef();

		return S_OK;
	}

	HRESULT hr = E_NOINTERFACE;
	while (pTable->pfnFinder)
	{
		if (!pTable->pIID || InlineIsEqualGUID(*pTable->pIID, riid))
		{
			if (pTable->pfnFinder == ENTRY_IS_OFFSET)
			{
				*ppv = (char*)pThis + pTable->dwData;
				reinterpret_cast<IUnknown *>(*ppv)->AddRef();

				return S_OK;
			}
			else
			{
				hr = pTable->pfnFinder(pThis, pTable->dwData, riid,ppv);
				if (hr == S_OK)
					break;
			}
		}
		pTable++;
	}

	if (hr != S_OK)
		*ppv = nullptr;

	return hr;
}
Пример #29
0
HRESULT CComModule::GetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
	_ASSERTE(m_pObjMap != NULL);
	_ATL_OBJMAP_ENTRY* pEntry = m_pObjMap;
	HRESULT hRes = S_OK;
	if (ppv == NULL)
		return E_POINTER;
	while (pEntry->pclsid != NULL)
	{
		if (InlineIsEqualGUID(rclsid, *pEntry->pclsid))
		{
			if (pEntry->pCF == NULL)
				hRes = pEntry->pFunc(NULL, riid, (LPVOID*)&pEntry->pCF);
			*ppv = pEntry->pCF;
			if (pEntry->pCF != NULL)
				pEntry->pCF->AddRef();
			break;
		}
		pEntry++;
	}
	if (*ppv == NULL && hRes == S_OK)
		hRes = CLASS_E_CLASSNOTAVAILABLE;
	return hRes;
}
Пример #30
0
HRESULT __stdcall DllGetClassObject(
  __in   REFCLSID rclsid,
  __in   REFIID riid,
  __out  LPVOID *ppv
)
{
	return com_function_contract_hresult(
		[&]() -> unique_hresult
		{
			unique_hresult hresult;

			if (InlineIsEqualGUID(CLSID_SampleCredentialProvider, rclsid))
			{
				std::unique_ptr<provider_factory> object(new provider_factory);

				if (!object)
				{
					return hresult_cast(E_OUTOFMEMORY);
				}

				hresult.reset(object->QueryInterface(riid, ppv));
				if (hresult)
				{
					object.release();
				}
			}
			else
			{
				hresult = hresult_cast(CLASS_E_CLASSNOTAVAILABLE);
			}
			return hresult;
		}, 
		int(), 
		int()
	);
}