1、请教谁用.net开发过ActiveX控件?
2、使用C#开发的Windows控件,在web中使用
<object id="helloworld" classid="http:HelloWorld.dll#HelloWorld.Demo" width="184" height="96"></object>
怎么显示一白框?
进行以下设置后仍然显示一白框!
Microsoft .NET Framework 1.1 向导>调整.net安全性>Internet>完全信任
2、使用C#开发的Windows控件,在web中使用
<object id="helloworld" classid="http:HelloWorld.dll#HelloWorld.Demo" width="184" height="96"></object>
怎么显示一白框?
进行以下设置后仍然显示一白框!
Microsoft .NET Framework 1.1 向导>调整.net安全性>Internet>完全信任
msdn的解决办法:
一、实现IObjectSafe接口
二、修改注册表
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;namespace HelloWorld
{
[ComImport, GuidAttribute("CB5BDC81-93C1-11CF-8F20-00805F2CD064")]
[InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
public interface IObjectSafety
{
[PreserveSig]
int GetInterfaceSafetyOptions(ref Guid riid, [MarshalAs(UnmanagedType.U4)] ref int pdwSupportedOptions, [MarshalAs(UnmanagedType.U4)] ref int pdwEnabledOptions); [PreserveSig()]
int SetInterfaceSafetyOptions(ref Guid riid, [MarshalAs(UnmanagedType.U4)] int dwOptionSetMask, [MarshalAs(UnmanagedType.U4)] int dwEnabledOptions);
}
}