C#??????ActiveX???
???????????? ???????[ 2014/1/8 9:42:23 ] ????????ActiveX ???
???????C#??дIObjectSafety??
using System;
using System.Runtime.InteropServices;
namespace KeyActiveX
{
[ComImport?? Guid("CB5BDC81-93C1-11CF-8F20-00805F2CD064")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IObjectSafety
{
[PreserveSig]
void GetInterfacceSafyOptions(
int riid??
out int pdwSupportedOptions??
out int pdwEnabledOptions);
[PreserveSig]
void SetInterfaceSafetyOptions(
int riid??
int dwOptionsSetMask??
int dwEnabledOptions);
}
}
????InterfaceType?????????ComInterfaceType.InterfaceIsIUnknown?????IObjectSafety?????IUnkown??
????????????KeyActiveX????????
namespace KeyActiveX
{
[Guid("94882155-3B7C-48e3-B357-234D56D8F15E")]
public partial class IdentityKey : UserControl?? IObjectSafety
{
#region IObjectSafety ???
public void GetInterfacceSafyOptions(int riid?? out int pdwSupportedOptions?? out int pdwEnabledOptions)
{
pdwSupportedOptions = 1;
pdwEnabledOptions = 2;
}
public void SetInterfaceSafetyOptions(int riid?? int dwOptionsSetMask?? int dwEnabledOptions)
{
throw new NotImplementedException();
}
#endregion
}
}
????????????????????????IE??????????????μ?http://support.microsoft.com/kb/182598/
?????????????????
????C#??????ActiveX?????????????????
????1.??????????????????????????????
????2.????????????????????????????
????3.???html??object??codebase???????????
???????????????????????????????????????????????????????????????????????????????Ρ??????ε??????????????????????Versign?????????????????????????????????
????????????Visual Studio 2008??????????鴴??????MakeCert?????????SignTool???в?????????????????й????????????飬??Visual Studio???????????????
????makecert -sk ABC -n "CN=ABC Corporation" f:abccorptest.cer
??????F??????????????顣???????
????signtool signwizard
??????Signing Options?????????Custom??????????????λ????????????????????????MD5??SHA1?????????ó?????????????URL??????
???????ActiveX?????????????????????δ???ε??????飬?????IE?????????δ????????????html??????
????<object id="controlbyid" classid="clsid:{94882155-3B7C-48e3-B357-234D56D8F15E}" codebase="setup.exe" ></object>
?????????????????????ActiveX??????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11