c# - ActiveX registered as Media Type Player fails under IFrame -


i've written activex control registers player particular mime type (application/pdf) following instructions on msdn page. player works fine when browse directly content matches media type, fails load control if url resides inside of iframe. url iframe same file loading when browsed directly. the control signed valid code-signing cert.

in other words, browsing http://localhost/test.pdf works.

browsing http://localhost/pdfframe.html fails, , contains this:

<html>   <body>     <iframe width="100%" height="100%" src="http://localhost/test.pdf">     </iframe>   </body> </html> 

specifically, see constructor on control fire. i've implemented iobjectsafety, , see setinterfacesafetyoptions() fire, control goes silent after that. form_load() never called.

could iobjectsafety implementation, or other issue?

in ie, under internet options -> programs -> manage addons, addon approved run *.

i've declared iobjectsafety using:

[comvisible(true)] [comimport()] [guid("cb5bdc81-93c1-11cf-8f20-00805f2cd064")] [interfacetype(cominterfacetype.interfaceisiunknown)] public interface iobjectsafety {     [preservesig()]     int getinterfacesafetyoptions(ref guid riid, out int pdwsupportedoptions,                   out int pdwenabledoptions);      [preservesig()]     int setinterfacesafetyoptions(ref guid riid, int dwoptionsetmask,                  int dwenabledoptions); } 

and implemented class with:

    int iobjectsafety.getinterfacesafetyoptions(ref guid riid,              out int pdwsupportedoptions, out int pdwenabledoptions)     {         objectsafetyoptions m_options =                  objectsafetyoptions.interfacesafe_for_untrusted_caller |                  objectsafetyoptions.interfacesafe_for_untrusted_data;         pdwsupportedoptions = (int)m_options;         pdwenabledoptions = (int)m_options;         return 0;     }      int iobjectsafety.setinterfacesafetyoptions(ref guid riid,              int dwoptionsetmask, int dwenabledoptions)     {         return 0;     } 


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -