在为插件窗口设置句柄时,Iexplore.exe中的KernelBase.dll处于未处理的异常状态 [英] Unhandled exception at KernelBase.dll in Iexplore.exe while setting a handle for plugin window

查看:111
本文介绍了在为插件窗口设置句柄时,Iexplore.exe中的KernelBase.dll处于未处理的异常状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为制作浏览器插件的新手,我正在制作一个基于firebreath的插件,它增加了两个整数。我正在通过将源附加到浏览器来调试插件。我在PLUGINAPI.cpp的这一步得到了上述异常我创建并构建了包装器的dll和c#类库。它的工作......将这些项目引用到我的firebreath api项目中。在PLUGINAPI项目>>



Being a newbie to making browser plugins, I'm making a firebreath based plugin which adds two integers. I'm debugging the plugin by attaching the source to the browser. I'm getting the above exception at this step of my PLUGINAPI.cpp I have created and built the dll of the wrapper and the c# class libraries. it's working..added the project references of these to my firebreath api project. In PLUGINAPI project>>

int PLUGINAPI::PerformAddition(int a, int b)
{
    IWrapIt *wrapIt=IWrapIt::CreateInstance();
    HWND handler=getPlugin()->AttachedWindow;
    wrapIt->SetHandle(handler);//ABOVE EXCEPTION RAISED HERE
    return wrapIt->PerformAddition(a,b);
}
In PLUGIN.cpp(window attached event)>>

 bool PLUGIN::onWindowAttached(FB::AttachedEvent *evt, FB::PluginWindow * wnd)
{
    // The window is attached; act appropriately
    AttachedWindow = wnd->get_as<fb::pluginwindowwin xmlns:fb="#unknown">()->getHWND();
    return false;
}



我在这里做错了什么?即使我已经将firebreath(非托管c ++)调试的属性设置为混合


What am I doing wrong here? Also My debug point in c# class library is not hit even if i have set the Property of the firebreath (unmanaged c++) debugging to mixed

推荐答案

在这种情况下,我的c#类库中的调试点也不会被命中常见问题是,句柄不是IWrapIt接口的有效句柄。
In such cases the most common issue is, that the handle is NOT a valid handle for that IWrapIt interface.


这篇关于在为插件窗口设置句柄时,Iexplore.exe中的KernelBase.dll处于未处理的异常状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆