【问题标题】:How to find the dispatch id of an event generated by an ActiveX control如何查找由 ActiveX 控件生成的事件的调度 ID
【发布时间】:2011-09-29 09:12:16
【问题描述】:

我正在使用 FireBreath 为 activeX 控件编写一个包装类。

ActiveX 容器类有一个事件接收器,它监听 ActiveX 控件触发的事件。

在创建事件接收器的代码中,在 SINK_ENTRY_INFO 方法中,参数之一是事件的调度 ID。

在哪里可以找到由 activeX 控件生成的事件的调度 ID?

【问题讨论】:

    标签: c++ events event-handling activex firebreath


    【解决方案1】:

    获取与对象上任何其他成员相同的 DISPID。您可能可以使用 firebreath 中的 IDispatchAPI 对象:

    https://github.com/firebreath/FireBreath/blob/master/src/ActiveXCore/IDispatchAPI.cpp#L444

    【讨论】:

    • 澄清一下,如果您通过将 IDispatch* 包装在 IDispatchAPI 对象中来触发事件,您只需将事件作为函数调用即可。
    • 我是从activex控件的接口事件代码中找到的。无论如何感谢您的链接
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-11-19
    • 2011-04-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多