[RESOLVED] Get rid of security question when interacting with ActiveX in WebBrowser control?
Hi.
I'm developing an application in VB6. In that application, we're using the WebBrowser control based on Internet Explorer. That WebBrowser control loads a local web page containing an ActiveX object.
Now, when i send parameters to the object using the <param> tag, or when i call the ActiveX object using javascript (as described below) i get a security question from Internet Explorer asking me if i want to allow interaction between the ActiveX control and the rest of the web page even though it might be a security risk.
I want to get rid of that security question. How can that be done?
HTML Code:
<object id="myActiveXControl" classid="[...]" codebase="[...]">
<param name="[...]" value="[...]">
myControl
</object>
<script>
document.getElementById('myActiveXControl').someFunction("Value");
</script>
Our application will be installed on our customers computers, hence we have access to the registry and such. Can it maybe be solved by installing certificates and signing the control?
Thanks!
Re: Get rid of security question when interacting with ActiveX in WebBrowser control?
I finally found my solution. I'll post it here in case someone else might need it.
The solution is that the ActiveX control must implement IObjectSafety. How that is done is described here: http://support.microsoft.com/kb/182598 Note that after step 4 you must register your new .tlb file. That's done like this:
Code:
regtlib <Full path of .tlb file>
Re: [RESOLVED] Get rid of security question when interacting with ActiveX in WebBrowser control?
lol!...
MORE INFORMATION
WARNING: One or more of the following functions are discussed in this article: VarPtr, VarPtrArray, VarPtrStringArray, StrPtr, and ObjPtr. These functions are not supported by Microsoft Technical Support. They are not documented in the Visual Basic documentation and are provided in this Knowledge Base article "as is."
Great post tho...