开发者

CWindowImpl::Create() Failing in Windows 7

I have a Firefox plugin dll, which works fine in Windows XP but crashes in Windows 7. Issue is with CWindowImpl::Create() which fails to create a Window(window handle is NULL). Also, GetLastError() returns NULL.

I am using ATL 3.0. I am thinking whether it would be a problem with this as many of the interface classes like CComModule are obsolete now. But surprisingly the 开发者_如何学Csame API works with IE9. So, unable to make any conclusion. I am yet to find a resolution for this. Found a similar query in msdn forum - http://social.msdn.microsoft.com/Forums/en-US/vcmfcatl/thread/2f200b88-622a-4f7c-9833-7d08bac4fa5f/ but no solution yet.

Any help would be highly appreciated.

Raveesh


I found a work around for this issue in FF plugin in Windows 7.The answer lies in DEP (Data Execution Prevention). This feature was enabled in my Windows 7 machine. After I disable this feature I was able to run my plugin in Firefox. Here is how you can disable DEP in Windows 7.

  1. Go to command prompt
  2. Execute the command bcdedit /set nx AlwaysOff
  3. Reboot the machine (rebooting is required for the above setting to reflect)

Ideally with DEP enabled, if you want to run your plugin, you have to build the plugin with the latest version of Windows SDK.

Original link - http://techbaraha.blogspot.com/2011/12/firefox-plugin-on-windows-7-workaround.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜