R
rbanerji
I am building a BHO that is meant to popup a IHtmlPopup window on a
mouse over image event. All the code works fine if the image is in the
main Window.
However if the image is in a frame then I get the following error:
{"Access is denied. (Exception from HRESULT: 0x80070005
(E_ACCESSDENIED))"} System.Exception
{System.UnauthorizedAccessException}
This happens when I try to create the Popup Window or access its
Document
The code below is in C#, but I think it would apply to C++ too.
I have tried getting the parentWindow from the Frame's document and
from the main document.
//IHTMLWindow4 parentWindow = (IHTMLWindow4)FrameDocument.parentWindow;
IHTMLWindow4 parentWindow = (IHTMLWindow4)PageDocument.parentWindow;
//This line will work, but if you look at the Document Property, you
will see the exception
IHTMLPopup popUp = (IHTMLPopup)parentWindow.createPopup( ref argIn );
//This line will throw the exception
IHTMLDocument2 popupDoc = (IHTMLDocument2)popUp.document;
Any ideas?
mouse over image event. All the code works fine if the image is in the
main Window.
However if the image is in a frame then I get the following error:
{"Access is denied. (Exception from HRESULT: 0x80070005
(E_ACCESSDENIED))"} System.Exception
{System.UnauthorizedAccessException}
This happens when I try to create the Popup Window or access its
Document
The code below is in C#, but I think it would apply to C++ too.
I have tried getting the parentWindow from the Frame's document and
from the main document.
//IHTMLWindow4 parentWindow = (IHTMLWindow4)FrameDocument.parentWindow;
IHTMLWindow4 parentWindow = (IHTMLWindow4)PageDocument.parentWindow;
//This line will work, but if you look at the Document Property, you
will see the exception
IHTMLPopup popUp = (IHTMLPopup)parentWindow.createPopup( ref argIn );
//This line will throw the exception
IHTMLDocument2 popupDoc = (IHTMLDocument2)popUp.document;
Any ideas?