

Hi,
To be notified if an activex (video) is about to be run, you need to subscribe to ProcessUrlAction event and check the value of urlAction parameter for URLACTION.ACTIVEX_RUN. You can always stop this action by setting urlPolicy parameter to URLPOLICY.DISALLOW and handled property to true.
如果一个activex(视频)运行,会被通知,您需要订阅ProcessUrlAction事件并检查URLACTION.ACTIVEX_RUN urlAction参数的值。通过设置urlPolicy urlPolicy参数为真,你总是可以阻止这一行动。
To determine if we are dealing with a specific activex such as flash, you can check the value of context parameter which should contain a CLSID(GUID) representing the activex object (check for GUID.Empty).
如果我们正在处理一个特定的activex比如Flash,要进行核实,您可以检查上下文参数的值,值应该包含一个CLSID(GUID)代表activex对象(检查GUID.Empty)。
//Here is an example, tested with youtube, stops display of flash player:
//ShockwaveFlash.ShockwaveFlash.9 - taken from registry
Guid flash = new Guid("D27CDB6E-AE6D-11cf-96B8-444553540000");
void cEXWB1_ProcessUrlAction(object sender,
csExWB.ProcessUrlActionEventArgs e)
{
if (e.urlAction == URLACTION.ACTIVEX_RUN)
{
if (e.context == flash)
{
//AllForms.m_frmLog.AppendToLog("cEXWB1_ProcessUrlAction\r\n" + e.context.ToString());
e.handled = true;
e.urlPolicy = URLPOLICY.DISALLOW;
}
}
}
下载:csEXWB v1.0.0.5
http://code.google.com/p/csexwb2/downloads/list
Please report any bugs: Issues List
请报告任何错误: 问题列表
http://code.google.com/p/csexwb2/issues/list
For general discussion, comments, and questions, please visit: csEXWB Group
一般讨论、评论和问题,请访问: csEXWB组
http://groups.google.com/group/csexwb
Regards
问候
MH