Win7+VS2010开发的ActiveX插件,在XP下无法正常显示
开发环境: Win7 + VS2010 + IE9
开发语言:C#
ActiveX 功能描述:在 ActiveX 上放置了一个 Label, 功能仅为简单显示 Label 的值。
问题描述: 开发出来的 ActiveX 插件在 Win7+IE8,IE9 下都能正常显示,但是在XP系统下的IE7和IE8访问就无法正常显示,出现大大的红叉。
控件已经生成好安装文件,并已在客户端安装成功,但是还是无法显示。
已经做过的操作:
1.将要访问的网址加入到信任站点中
2.将IE的权限开到最低
但是最终还是无法解决问题,我以为将请知情的大虾给予回帖,谢谢。
开发参考的网页:http://blog.163.com/tom19900920@126/blog/static/2349868720121195250522/
CS文件的代码:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace eFTPUpload
{
[Guid("48519495-9D58-4C0B-BE5C-ECD8020D3F1E")]
public partial class Demo : UserControl,IObjectSafety
{
public Demo()
{
InitializeComponent();
}
public void GetInterfacceSafyOptions(int riid, out int pdwSupportedOptions, out int pdwEnabledOptions)
{
// TODO: 添加WebCamControl.GetInterfacceSafyOptions 实现
pdwSupportedOptions = CLsObjectSafety.INTERFACESAFE_FOR_UNTRUSTED_CALLER;
pdwEnabledOptions = CLsObjectSafety.INTERFACESAFE_FOR_UNTRUSTED_DATA;
}
public void SetInterfaceSafetyOptions(int riid, int dwOptionsSetMask, int dwEnabledOptions)
{
throw new NotImplementedException();
}
}
[Guid("CB5BDC81-93C1-11CF-8F20-00805F2CD064"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IObjectSafety
{
void GetInterfacceSafyOptions(
System.Int32 riid,
out System.Int32 pdwSupportedOptions,
out System.Int32 pdwEnabledOptions);
void SetInterfaceSafetyOptions(
System.Int32 riid,
System.Int32 dwOptionsSetMask,
System.Int32 dwEnabledOptions);
}
public class CLsObjectSafety
{
public const System.Int32 INTERFACESAFE_FOR_UNTRUSTED_CALLER = 0x00000001;
public const System.Int32 INTERFACESAFE_FOR_UNTRUSTED_DATA = 0x00000002;
}
}