本文整理汇总了C++中IClassFactory_QueryInterface函数的典型用法代码示例。如果您正苦于以下问题:C++ IClassFactory_QueryInterface函数的具体用法?C++ IClassFactory_QueryInterface怎么用?C++ IClassFactory_QueryInterface使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IClassFactory_QueryInterface函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DllGetClassObject
/***********************************************************************
* DllGetClassObject ([email protected])
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
if(IsEqualGUID(&CLSID_WebBrowser, rclsid)) {
TRACE("(CLSID_WebBrowser %s %p)\n", debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&WebBrowserFactory, riid, ppv);
}
if(IsEqualGUID(&CLSID_WebBrowser_V1, rclsid)) {
TRACE("(CLSID_WebBrowser_V1 %s %p)\n", debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&WebBrowserV1Factory, riid, ppv);
}
if(IsEqualGUID(rclsid, &CLSID_InternetShortcut)) {
TRACE("(CLSID_InternetShortcut %s %p)\n", debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&InternetShortcutFactory, riid, ppv);
}
if(IsEqualGUID(&CLSID_CUrlHistory, rclsid)) {
TRACE("(CLSID_CUrlHistory %s %p)\n", debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&CUrlHistoryFactory, riid, ppv);
}
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
示例2: DllGetClassObject
/***********************************************************************
* DllGetClassObject ([email protected])
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
if(IsEqualGUID(&CLSID_VBScript, rclsid)) {
TRACE("(CLSID_VBScript %s %p)\n", debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&VBScriptFactory, riid, ppv);
}else if(IsEqualGUID(&CLSID_VBScriptRegExp, rclsid)) {
TRACE("(CLSID_VBScriptRegExp %s %p)\n", debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&VBScriptRegExpFactory, riid, ppv);
}
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
示例3: DllGetClassObject
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
if(IsEqualGUID(&CLSID_FileSystemObject, rclsid)) {
TRACE("(CLSID_FileSystemObject %s %p)\n", debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&FileSystemFactory, riid, ppv);
}
else if(IsEqualGUID(&CLSID_Dictionary, rclsid)) {
TRACE("(CLSID_Dictionary %s %p)\n", debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&DictionaryFactory, riid, ppv);
}
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
示例4: DllGetClassObject
/*************************************************************************
* DllGetClassObject ([email protected])
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
{
static IClassFactoryImpl NSTCClassFactory = {{&EFCF_Vtbl}, NamespaceTreeControl_Constructor};
static IClassFactoryImpl TaskbarListFactory = {{&EFCF_Vtbl}, TaskbarList_Constructor};
TRACE("%s, %s, %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if(IsEqualGUID(&CLSID_NamespaceTreeControl, rclsid))
return IClassFactory_QueryInterface(&NSTCClassFactory.IClassFactory_iface, riid, ppv);
if(IsEqualGUID(&CLSID_TaskbarList, rclsid))
return IClassFactory_QueryInterface(&TaskbarListFactory.IClassFactory_iface, riid, ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
示例5: DllGetClassObject
/*************************************************************************
* DllGetClassObject ([email protected])
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
{
static IClassFactoryImpl FileOpenDlgClassFactory = {{&CDLGCF_Vtbl}, FileOpenDialog_Constructor};
static IClassFactoryImpl FileSaveDlgClassFactory = {{&CDLGCF_Vtbl}, FileSaveDialog_Constructor};
TRACE("%s, %s, %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
if(IsEqualGUID(&CLSID_FileOpenDialog, rclsid))
return IClassFactory_QueryInterface(&FileOpenDlgClassFactory.IClassFactory_iface, riid, ppv);
if(IsEqualGUID(&CLSID_FileSaveDialog, rclsid))
return IClassFactory_QueryInterface(&FileSaveDlgClassFactory.IClassFactory_iface, riid, ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
示例6: InstanceObjectFactory_Constructor
HRESULT InstanceObjectFactory_Constructor(REFCLSID rclsid, IPropertyBag *pPropertyBag, REFIID riid,
LPVOID *ppvObject)
{
InstanceObjectFactory *pInstanceObjectFactory;
HRESULT hr = E_FAIL;
TRACE("(RegistryPropertyBag=%p, riid=%s, ppvObject=%p)\n", pPropertyBag,
debugstr_guid(riid), ppvObject);
pInstanceObjectFactory = shdocvw_alloc(sizeof(InstanceObjectFactory));
if (pInstanceObjectFactory) {
pInstanceObjectFactory->lpIClassFactoryVtbl = &InstanceObjectFactory_IClassFactoryVtbl;
pInstanceObjectFactory->m_cRef = 0;
memcpy(&pInstanceObjectFactory->m_clsidInstance, rclsid, sizeof(CLSID));
pInstanceObjectFactory->m_pPropertyBag = pPropertyBag;
IPropertyBag_AddRef(pPropertyBag);
IClassFactory_AddRef(STATIC_CAST(IClassFactory, pInstanceObjectFactory));
hr = IClassFactory_QueryInterface(STATIC_CAST(IClassFactory, pInstanceObjectFactory),
riid, ppvObject);
IClassFactory_Release(STATIC_CAST(IClassFactory, pInstanceObjectFactory));
}
return hr;
}
示例7: DllGetClassObject
STDAPI
DllGetClassObject(
REFCLSID rclsid,
REFIID riid,
LPVOID* ppv
)
{
UINT i;
HRESULT hres = E_OUTOFMEMORY;
IClassFactory * pcf = NULL;
if (!ppv)
return E_INVALIDARG;
*ppv = NULL;
for (i = 0; InterfaceTable[i].riid; i++)
{
if (IsEqualIID(InterfaceTable[i].riid, rclsid))
{
pcf = IClassFactory_fnConstructor(InterfaceTable[i].lpfnCI, NULL, NULL);
break;
}
}
if (!pcf)
{
return CLASS_E_CLASSNOTAVAILABLE;
}
hres = IClassFactory_QueryInterface(pcf, riid, ppv);
IClassFactory_Release(pcf);
return hres;
}
示例8: DllGetClassObject
/*************************************************************************
* DllGetClassObject [[email protected]]
* SHDllGetClassObject [SHELL32.128]
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
{
HRESULT hres = E_OUTOFMEMORY;
IClassFactory * pcf = NULL;
int i;
TRACE("CLSID:%s,IID:%s\n",shdebugstr_guid(rclsid),shdebugstr_guid(iid));
if (!ppv) return E_INVALIDARG;
*ppv = NULL;
/* search our internal interface table */
for(i=0;InterfaceTable[i].riid;i++) {
if(IsEqualIID(InterfaceTable[i].riid, rclsid)) {
TRACE("index[%u]\n", i);
pcf = IDefClF_fnConstructor(InterfaceTable[i].lpfnCI, NULL, NULL);
}
}
if (!pcf) {
FIXME("failed for CLSID=%s\n", shdebugstr_guid(rclsid));
return CLASS_E_CLASSNOTAVAILABLE;
}
hres = IClassFactory_QueryInterface(pcf, iid, ppv);
IClassFactory_Release(pcf);
TRACE("-- pointer to class factory: %p\n",*ppv);
return hres;
}
示例9: InstanceObjectFactory_Constructor
static HRESULT InstanceObjectFactory_Constructor(REFCLSID rclsid, IPropertyBag *pPropertyBag,
REFIID riid, LPVOID *ppvObject)
{
InstanceObjectFactory *pInstanceObjectFactory;
HRESULT hr = E_FAIL;
TRACE("(RegistryPropertyBag=%p, riid=%s, ppvObject=%p)\n", pPropertyBag,
debugstr_guid(riid), ppvObject);
pInstanceObjectFactory = heap_alloc(sizeof(InstanceObjectFactory));
if (pInstanceObjectFactory) {
pInstanceObjectFactory->IClassFactory_iface.lpVtbl = &InstanceObjectFactory_IClassFactoryVtbl;
pInstanceObjectFactory->m_cRef = 0;
pInstanceObjectFactory->m_clsidInstance = *rclsid;
pInstanceObjectFactory->m_pPropertyBag = pPropertyBag;
IPropertyBag_AddRef(pPropertyBag);
IClassFactory_AddRef(&pInstanceObjectFactory->IClassFactory_iface);
hr = IClassFactory_QueryInterface(&pInstanceObjectFactory->IClassFactory_iface,
riid, ppvObject);
IClassFactory_Release(&pInstanceObjectFactory->IClassFactory_iface);
}
return hr;
}
示例10: DllGetClassObject
/***********************************************************************
* DllGetClassObject ([email protected])
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
if(IsEqualGUID(&CLSID_UserIdentityManager, rclsid)) {
TRACE("CLSID_UserIdentityManager\n");
return IClassFactory_QueryInterface(&UserIdentityManagerCF, riid, ppv);
}
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
示例11: DllGetClassObject
/***********************************************************************
* DllGetClassObject ([email protected])
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
if(IsEqualGUID(&CLSID_WshShell, rclsid)) {
TRACE("(CLSID_WshShell %s %p)\n", debugstr_guid(riid), ppv);
return IClassFactory_QueryInterface(&WshShellFactory, riid, ppv);
}
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
示例12: DllGetClassObject
/**************************************************************
* DllGetClassObject (ATL.2)
*/
HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, LPVOID *ppvObject)
{
TRACE("(%s %s %p)\n", debugstr_guid(clsid), debugstr_guid(riid), ppvObject);
if(IsEqualGUID(&CLSID_Registrar, clsid))
return IClassFactory_QueryInterface( &RegistrarCF, riid, ppvObject );
FIXME("Not supported class %s\n", debugstr_guid(clsid));
return CLASS_E_CLASSNOTAVAILABLE;
}
示例13: DllGetClassObject
/***********************************************************************
* DllGetClassObject ([email protected])
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
{
if(IsEqualGUID(rclsid, &CLSID_InstallEngine)) {
TRACE("(CLSID_InstallEngine %s %p)\n", debugstr_guid(iid), ppv);
return IClassFactory_QueryInterface(&InstallEngineCF, iid, ppv);
}
FIXME("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
示例14: DllGetClassObject
/*************************************************************************
* DllGetClassObject ([email protected])
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
{
static IClassFactoryImpl WB1ClassFactory = {&WBCF_Vtbl, WebBrowserV1_Create};
static IClassFactoryImpl WB2ClassFactory = {&WBCF_Vtbl, WebBrowserV2_Create};
static IClassFactoryImpl CUHClassFactory = {&WBCF_Vtbl, CUrlHistory_Create};
TRACE("\n");
if(IsEqualGUID(&CLSID_WebBrowser, rclsid))
return IClassFactory_QueryInterface(FACTORY(&WB2ClassFactory), riid, ppv);
if(IsEqualGUID(&CLSID_WebBrowser_V1, rclsid))
return IClassFactory_QueryInterface(FACTORY(&WB1ClassFactory), riid, ppv);
if(IsEqualGUID(&CLSID_CUrlHistory, rclsid))
return IClassFactory_QueryInterface(FACTORY(&CUHClassFactory), riid, ppv);
/* As a last resort, figure if the CLSID belongs to a 'Shell Instance Object' */
return SHDOCVW_GetShellInstanceObjectClassObject(rclsid, riid, ppv);
}
示例15: DllGetClassObject
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
{
TRACE("(%s %s %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
if (IsEqualGUID(rclsid, &CLSID_CTaskScheduler)) {
return IClassFactory_QueryInterface((LPCLASSFACTORY)&MSTASK_ClassFactory, iid, ppv);
}
FIXME("Not supported class: %s\n", debugstr_guid(rclsid));
return CLASS_E_CLASSNOTAVAILABLE;
}