MFC developed the OCX control to put it online

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.