• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ IHTMLDOMNode_QueryInterface函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中IHTMLDOMNode_QueryInterface函数的典型用法代码示例。如果您正苦于以下问题:C++ IHTMLDOMNode_QueryInterface函数的具体用法?C++ IHTMLDOMNode_QueryInterface怎么用?C++ IHTMLDOMNode_QueryInterface使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了IHTMLDOMNode_QueryInterface函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: HTMLFormElement_QueryInterface

static HRESULT WINAPI HTMLFormElement_QueryInterface(IHTMLFormElement *iface,
        REFIID riid, void **ppv)
{
    HTMLFormElement *This = HTMLFORM_THIS(iface);

    return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
}
开发者ID:bilboed,项目名称:wine,代码行数:7,代码来源:htmlform.c


示例2: HTMLDOMTextNode_QueryInterface

static HRESULT WINAPI HTMLDOMTextNode_QueryInterface(IHTMLDOMTextNode *iface,
                                                 REFIID riid, void **ppv)
{
    HTMLDOMTextNode *This = impl_from_IHTMLDOMTextNode(iface);

    return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv);
}
开发者ID:DusteDdk,项目名称:wine-multimedia,代码行数:7,代码来源:htmltextnode.c


示例3: HTMLTextAreaElement_get_form

static HRESULT WINAPI HTMLTextAreaElement_get_form(IHTMLTextAreaElement *iface, IHTMLFormElement **p)
{
    HTMLTextAreaElement *This = impl_from_IHTMLTextAreaElement(iface);
    nsIDOMHTMLFormElement *nsform;
    nsIDOMNode *nsnode;
    HTMLDOMNode *node;
    nsresult nsres;
    HRESULT hres;

    TRACE("(%p)->(%p)\n", This, p);

    nsres = nsIDOMHTMLTextAreaElement_GetForm(This->nstextarea, &nsform);
    assert(nsres == NS_OK);

    if(!nsform) {
        *p = NULL;
        return S_OK;
    }

    nsres = nsIDOMHTMLFormElement_QueryInterface(nsform, &IID_nsIDOMNode, (void**)&nsnode);
    nsIDOMHTMLFormElement_Release(nsform);
    assert(nsres == NS_OK);

    hres = get_node(This->element.node.doc, nsnode, TRUE, &node);
    nsIDOMNode_Release(nsnode);
    if(FAILED(hres))
        return hres;

    hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLFormElement, (void**)p);
    IHTMLDOMNode_Release(&node->IHTMLDOMNode_iface);
    return hres;
}
开发者ID:GYGit,项目名称:reactos,代码行数:32,代码来源:htmltextarea.c


示例4: HTMLFormElement_QueryInterface

static HRESULT WINAPI HTMLFormElement_QueryInterface(IHTMLFormElement *iface,
        REFIID riid, void **ppv)
{
    HTMLFormElement *This = impl_from_IHTMLFormElement(iface);

    return IHTMLDOMNode_QueryInterface(&This->element.node.IHTMLDOMNode_iface, riid, ppv);
}
开发者ID:GranPC,项目名称:wine,代码行数:7,代码来源:htmlform.c


示例5: HTMLDocument3_get_documentElement

static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, IHTMLElement **p)
{
    HTMLDocument *This = HTMLDOC3_THIS(iface);
    nsIDOMDocument *nsdoc;
    HTMLDOMNode *node;
    nsresult nsres;

    TRACE("(%p)->(%p)\n", This, p);

    if(!This->nscontainer) {
        *p = NULL;
        return S_OK;
    }

    nsres = nsIWebNavigation_GetDocument(This->nscontainer->navigation, &nsdoc);
    if(NS_FAILED(nsres))
        ERR("GetDocument failed: %08lx\n", nsres);

    if(nsdoc) {
        node = get_node(This, (nsIDOMNode*)nsdoc);
        nsIDOMDocument_Release(nsdoc);

        IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)p);
    }else {
        *p = NULL;
    }

    return S_OK;
}
开发者ID:howard5888,项目名称:wineT,代码行数:29,代码来源:htmldoc3.c


示例6: HTMLTableRow_QueryInterface

static HRESULT WINAPI HTMLTableRow_QueryInterface(IHTMLTableRow *iface,
        REFIID riid, void **ppv)
{
    HTMLTableRow *This = HTMLTABLEROW_THIS(iface);

    return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv);
}
开发者ID:bilboed,项目名称:wine,代码行数:7,代码来源:htmltablerow.c


示例7: HTMLDOMTextNode_QueryInterface

static HRESULT WINAPI HTMLDOMTextNode_QueryInterface(IHTMLDOMTextNode *iface,
                                                 REFIID riid, void **ppv)
{
    HTMLDOMTextNode *This = HTMLTEXT_THIS(iface);

    return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->node), riid, ppv);
}
开发者ID:WASSUM,项目名称:longene_travel,代码行数:7,代码来源:htmltextnode.c


示例8: HTMLFrameElement3_QueryInterface

static HRESULT WINAPI HTMLFrameElement3_QueryInterface(IHTMLFrameElement3 *iface,
        REFIID riid, void **ppv)
{
    HTMLFrameElement *This = impl_from_IHTMLFrameElement3(iface);

    return IHTMLDOMNode_QueryInterface(&This->framebase.element.node.IHTMLDOMNode_iface, riid, ppv);
}
开发者ID:hoangduit,项目名称:reactos,代码行数:7,代码来源:htmlframe.c


示例9: HTMLDocument3_get_documentElement

static HRESULT WINAPI HTMLDocument3_get_documentElement(IHTMLDocument3 *iface, IHTMLElement **p)
{
    HTMLDocument *This = HTMLDOC3_THIS(iface);
    nsIDOMElement *nselem = NULL;
    HTMLDOMNode *node;
    nsresult nsres;

    TRACE("(%p)->(%p)\n", This, p);

    if(This->window->readystate == READYSTATE_UNINITIALIZED) {
        *p = NULL;
        return S_OK;
    }

    if(!This->doc_node->nsdoc) {
        WARN("NULL nsdoc\n");
        return E_UNEXPECTED;
    }

    nsres = nsIDOMHTMLDocument_GetDocumentElement(This->doc_node->nsdoc, &nselem);
    if(NS_FAILED(nsres)) {
        ERR("GetDocumentElement failed: %08x\n", nsres);
        return E_FAIL;
    }

    if(nselem) {
        node = get_node(This->doc_node, (nsIDOMNode *)nselem, TRUE);
        nsIDOMElement_Release(nselem);
        IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)p);
    }else {
        *p = NULL;
    }

    return S_OK;
}
开发者ID:bilboed,项目名称:wine,代码行数:35,代码来源:htmldoc3.c


示例10: HTMLObjectElement2_QueryInterface

static HRESULT WINAPI HTMLObjectElement2_QueryInterface(IHTMLObjectElement2 *iface,
        REFIID riid, void **ppv)
{
    HTMLObjectElement *This = impl_from_IHTMLObjectElement2(iface);

    return IHTMLDOMNode_QueryInterface(&This->plugin_container.element.node.IHTMLDOMNode_iface,
            riid, ppv);
}
开发者ID:GranPC,项目名称:wine,代码行数:8,代码来源:htmlobject.c


示例11: HTMLEventObj_get_srcElement

static HRESULT WINAPI HTMLEventObj_get_srcElement(IHTMLEventObj *iface, IHTMLElement **p)
{
    HTMLEventObj *This = impl_from_IHTMLEventObj(iface);

    TRACE("(%p)->(%p)\n", This, p);

    return IHTMLDOMNode_QueryInterface(&This->target->IHTMLDOMNode_iface, &IID_IHTMLElement,
            (void**)p);
}
开发者ID:mikekap,项目名称:wine,代码行数:9,代码来源:htmlevent.c


示例12: HTMLOptionElementFactory_create

static HRESULT WINAPI HTMLOptionElementFactory_create(IHTMLOptionElementFactory *iface,
        VARIANT text, VARIANT value, VARIANT defaultselected, VARIANT selected,
        IHTMLOptionElement **optelem)
{
    HTMLOptionElementFactory *This = impl_from_IHTMLOptionElementFactory(iface);
    nsIDOMHTMLElement *nselem;
    HTMLDOMNode *node;
    HRESULT hres;

    static const PRUnichar optionW[] = {'O','P','T','I','O','N',0};

    TRACE("(%p)->(%s %s %s %s %p)\n", This, debugstr_variant(&text), debugstr_variant(&value),
          debugstr_variant(&defaultselected), debugstr_variant(&selected), optelem);

    if(!This->window || !This->window->doc) {
        WARN("NULL doc\n");
        return E_UNEXPECTED;
    }

    *optelem = NULL;

    hres = create_nselem(This->window->doc, optionW, &nselem);
    if(FAILED(hres))
        return hres;

    hres = get_node(This->window->doc, (nsIDOMNode*)nselem, TRUE, &node);
    nsIDOMHTMLElement_Release(nselem);
    if(FAILED(hres))
        return hres;

    hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface,
            &IID_IHTMLOptionElement, (void**)optelem);
    node_release(node);

    if(V_VT(&text) == VT_BSTR)
        IHTMLOptionElement_put_text(*optelem, V_BSTR(&text));
    else if(V_VT(&text) != VT_EMPTY)
        FIXME("Unsupported text %s\n", debugstr_variant(&text));

    if(V_VT(&value) == VT_BSTR)
        IHTMLOptionElement_put_value(*optelem, V_BSTR(&value));
    else if(V_VT(&value) != VT_EMPTY)
        FIXME("Unsupported value %s\n", debugstr_variant(&value));

    if(V_VT(&defaultselected) != VT_EMPTY)
        FIXME("Unsupported defaultselected %s\n", debugstr_variant(&defaultselected));
    if(V_VT(&selected) != VT_EMPTY)
        FIXME("Unsupported selected %s\n", debugstr_variant(&selected));

    return S_OK;
}
开发者ID:RareHare,项目名称:reactos,代码行数:51,代码来源:htmloption.c


示例13: HTMLSelectElement_get_form

static HRESULT WINAPI HTMLSelectElement_get_form(IHTMLSelectElement *iface, IHTMLFormElement **p)
{
    HTMLSelectElement *This = impl_from_IHTMLSelectElement(iface);
    nsIDOMHTMLFormElement *nsform;
    nsIDOMNode *form_node;
    HTMLDOMNode *node;
    HRESULT hres;
    nsresult nsres;

    TRACE("(%p)->(%p)\n", This, p);

    if(!p)
        return E_POINTER;

    nsres = nsIDOMHTMLSelectElement_GetForm(This->nsselect, &nsform);
    FIXME("get form %08x : %p\n", nsres, nsform);
    if (NS_FAILED(nsres)) {
        ERR("GetForm failed: %08x, nsform: %p\n", nsres, nsform);
        *p = NULL;
        return E_FAIL;
    }
    if (nsform == NULL) {
        TRACE("nsform not found\n");
        *p = NULL;
        return S_OK;
    }

    nsres = nsIDOMHTMLFormElement_QueryInterface(nsform, &IID_nsIDOMNode, (void**)&form_node);
    nsIDOMHTMLFormElement_Release(nsform);
    assert(nsres == NS_OK);

    hres = get_node(This->element.node.doc, form_node, TRUE, &node);
    nsIDOMNode_Release(form_node);
    if (FAILED(hres))
        return hres;

    hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p);

    node_release(node);
    return hres;
}
开发者ID:YongHaoWu,项目名称:wine-hub,代码行数:41,代码来源:htmlselect.c


示例14: HTMLElement2_insertAdjacentElement

static HRESULT WINAPI HTMLElement2_insertAdjacentElement(IHTMLElement2 *iface, BSTR where,
        IHTMLElement *insertedElement, IHTMLElement **inserted)
{
    HTMLElement *This = impl_from_IHTMLElement2(iface);
    HTMLDOMNode *ret_node;
    HTMLElement *elem;
    HRESULT hres;

    TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(where), insertedElement, inserted);

    elem = unsafe_impl_from_IHTMLElement(insertedElement);
    if(!elem)
        return E_INVALIDARG;

    hres = insert_adjacent_node(This, where, elem->node.nsnode, &ret_node);
    if(FAILED(hres))
        return hres;

    hres = IHTMLDOMNode_QueryInterface(&ret_node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)inserted);
    IHTMLDOMNode_Release(&ret_node->IHTMLDOMNode_iface);
    return hres;
}
开发者ID:RareHare,项目名称:reactos,代码行数:22,代码来源:htmlelem2.c


示例15: SVGTextContentElement_QueryInterface

static HRESULT WINAPI SVGTextContentElement_QueryInterface(ISVGTextContentElement *iface,
        REFIID riid, void **ppv)
{
    SVGTextContentElement *This = impl_from_ISVGTextContentElement(iface);
    return IHTMLDOMNode_QueryInterface(&This->svg_element->element.node.IHTMLDOMNode_iface, riid, ppv);
}
开发者ID:wine-mirror,项目名称:wine,代码行数:6,代码来源:svg.c


示例16: HTMLDocument3_getElementById

static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v,
                                                   IHTMLElement **pel)
{
    HTMLDocument *This = HTMLDOC3_THIS(iface);
    nsIDOMElement *nselem;
    HTMLDOMNode *node;
    nsIDOMNode *nsnode, *nsnode_by_id, *nsnode_by_name;
    nsIDOMNodeList *nsnode_list;
    nsAString id_str;
    nsresult nsres;

    TRACE("(%p)->(%s %p)\n", This, debugstr_w(v), pel);

    if(!This->doc_node->nsdoc) {
        WARN("NULL nsdoc\n");
        return E_UNEXPECTED;
    }

    nsAString_InitDepend(&id_str, v);
    /* get element by id attribute */
    nsres = nsIDOMHTMLDocument_GetElementById(This->doc_node->nsdoc, &id_str, &nselem);
    if(FAILED(nsres)) {
        ERR("GetElementById failed: %08x\n", nsres);
        nsAString_Finish(&id_str);
        return E_FAIL;
    }
    nsnode_by_id = (nsIDOMNode*)nselem;

    /* get first element by name attribute */
    nsres = nsIDOMHTMLDocument_GetElementsByName(This->doc_node->nsdoc, &id_str, &nsnode_list);
    nsAString_Finish(&id_str);
    if(FAILED(nsres)) {
        ERR("getElementsByName failed: %08x\n", nsres);
        if(nsnode_by_id)
            nsIDOMNode_Release(nsnode_by_id);
        return E_FAIL;
    }
    nsIDOMNodeList_Item(nsnode_list, 0, &nsnode_by_name);
    nsIDOMNodeList_Release(nsnode_list);


    if(nsnode_by_name && nsnode_by_id) {
        nsIDOM3Node *node3;
        PRUint16 pos;

        nsres = nsIDOMNode_QueryInterface(nsnode_by_name, &IID_nsIDOM3Node, (void**)&node3);
        if(NS_FAILED(nsres)) {
            FIXME("failed to get nsIDOM3Node interface: 0x%08x\n", nsres);
            nsIDOMNode_Release(nsnode_by_name);
            nsIDOMNode_Release(nsnode_by_id);
            return E_FAIL;
        }

        nsres = nsIDOM3Node_CompareDocumentPosition(node3, nsnode_by_id, &pos);
        nsIDOM3Node_Release(node3);
        if(NS_FAILED(nsres)) {
            FIXME("nsIDOM3Node_CompareDocumentPosition failed: 0x%08x\n", nsres);
            nsIDOMNode_Release(nsnode_by_name);
            nsIDOMNode_Release(nsnode_by_id);
            return E_FAIL;
        }

        TRACE("CompareDocumentPosition gave: 0x%x\n", pos);
        if(pos & PRECEDING || pos & CONTAINS) {
            nsnode = nsnode_by_id;
            nsIDOMNode_Release(nsnode_by_name);
        }else {
            nsnode = nsnode_by_name;
            nsIDOMNode_Release(nsnode_by_id);
        }
    }else
        nsnode = nsnode_by_name ? nsnode_by_name : nsnode_by_id;

    if(nsnode) {
        node = get_node(This->doc_node, nsnode, TRUE);
        nsIDOMNode_Release(nsnode);

        IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_IHTMLElement, (void**)pel);
    }else {
        *pel = NULL;
    }

    return S_OK;
}
开发者ID:bilboed,项目名称:wine,代码行数:84,代码来源:htmldoc3.c


示例17: InternetHostSecurityManager_QueryInterface

static HRESULT WINAPI InternetHostSecurityManager_QueryInterface(IInternetHostSecurityManager *iface, REFIID riid, void **ppv)
{
    HTMLDocumentNode *This = impl_from_IInternetHostSecurityManager(iface);
    return IHTMLDOMNode_QueryInterface(&This->node.IHTMLDOMNode_iface, riid, ppv);
}
开发者ID:MichaelMcDonnell,项目名称:wine,代码行数:5,代码来源:secmgr.c



注:本文中的IHTMLDOMNode_QueryInterface函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IHTMLDOMNode_Release函数代码示例发布时间:2022-05-30
下一篇:
C++ IGRAPH_VECTOR_INIT_FINALLY函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap