In fact, here can find a lot of documents online.
MFC development ActiveX control local good, but put on the internet for others to access or download or relatively fine work. Here, tidy up.
Package Signature:
Cabarc n test.cab test.inf Anedit.ocx so it's packaged into Test.cab
MAKECERT/SV "TEST.PVK"/n "cn=test"-$ "Individual"-R test.cer
CERT2SPC Test.cer TEST.SPC
Signcode.exe start signing.
The key here is actually writing Test.inf
[Version]
Signature= "$CHICAGO $"
advancedinf=2.0
[Add.Code]
Anedit.ocx=anedit.ocx
[Anedit.ocx]
File-win32-x86=thiscab
Registerserver=yes//Whether register, not write Yes next time also remind.
CLSID={134DC7AA-A178-4432-BF32-615C27D5CD35}
destdir=11
fileversion=1,0,0,1
There may be a dependency on the library, this later, and now this is not dependent on this
CLSID={134DC7AA-A178-4432-BF32-615C27D5CD35} is the class number in the MFC program
Caneditctrl's class information
[UUID (134DC7AA-A178-4432-BF32-615C27D5CD35),
helpstring ("Anedit control"), control]
CoClass Anedit
{
[Default] dispinterface _danedit;
[Default, source] dispinterface _daneditevents;
};
Okay, the INF file is that way.
Then the Web page
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 "/>
<title>nihao</title>
<p> my security plug-in </p>
<object classid= "clsid:134dc7aa-a178-4432-bf32-615c27d5cd35" id= "test" codebase= "http://192.168.0.222/AnEdit/ test.cab#version=1,0,0,1 "
width=400
height=200
Align=center
</object>
<body>
</body>
Clsid:134dc7aa-a178-4432-bf32-615c27d5cd35 the same as the top. Test.cab is the bag just above. Don't write anedit.ocx here.
Otherwise, it doesn't make sense to sign anything.
If this is the only way to send online, because the certificate is invalid, generally considered invalid signature. You will be prompted for invalid signatures and cannot even be installed ...
Import the certificate test.cer; OK, so you can use a valid signature for direct download!
MFC developed the OCX control to put it online