Tutorials to .com

Tutorials to .com » Dotnet » Control-and-components » Published Activex

Published Activex

Print View , by: iSee ,Total views: 16 ,Word Count: 1363 ,Date: Fri, 22 May 2009 Time: 7:05 PM

1, If you need to create a cab file, first of all need to Cabarc or Makecab, the Cabinet SDK as they have been installed, Cabinet SDK download address is http://msdn.microsoft.com/workshop/management/cab/cabdl.asp .
Cabarc can create, view or solution file inside the cab, and only Makecab can be used to create a cab file.
2, the production of cab files need to have all the relevant documents to include, you can Depends (VC's own) need to check documents. Inf file used to write all these things into account.
3, inf engage in law: inf file to describe all the cab of the ocx and dll files, inf region through a number of names to provide the required information.

How to write inf
The most general is the beginning of [Version] District:
eg: [Version]
signature = "$ XXXX $"
AdvancedINF = 2.0
Next is the most important [Add.Code] District:
eg: [Add.Code]
Ctrl1.dll = C1Section
Ctrl2.dll = Ctrl2.dll
Ahead is to download the file name, followed by the area corresponding to the document domain, can be any name, but are generally the same names and documents to facilitate maintenance. There is a need to pay attention to [Add.Code] area of the document to be sorted according to dependencies, such as in front of ctrl1.dll said to be dependent on the ctrl2.dll, while ctrl2.dll to appear in front of ctrl1.dll. Because the installation is carried out in accordance with the reverse order, that is to install ctrl2.dll, then ctrl1.dll,, clear mind, do not engage in anti-a.
Various documents and then followed by a regional
file-win32-x86 = thiscab
RegisterServer = yes
clsid ={.....}
DestDir =
FileVersion = 1,0,0,0
[Ctrl1.dll] zone file of the first ie the value of telling where to get this dll, file a total of three parts, first part is file, this will always be this kind of (at least); the second part tells to declare their support for the OS, win32, said windows, mac is the MAC OX Apple; the third part is the CPU type, for example, x86, ppc (Power PC), mips or the alpha.
file can take three of the value of a URL, ignore and thiscab, is illustrated in the case of URL to the URL location to the next; ignore if it is that this os and CPU, do not need to download the document (ctrl1.dll); if is obviously thiscab in the current document in a cab.
Followed by RegisterServer, can take two values yes and no, if yes then ie to register the dll, if it is of no do not have to;
Further down is DestDir, its value is the dll will have to keep the location to the local hard disk, if its value is 10, will dll into \ Windows or \ WinNT under; If it is 11, is on the \ Windows \ system or
\ WinNT \ System32 under; If it is empty (no value) will be on the \ Windows or \ WinNT under the Downloaded Program Files directory;
Finally, FileVersion, the more obvious, and shows the version number ctrl1.dll.
Sometimes we use vb to develop controls, the need for the VB Virtual Machine, it needs some other explanation, and simple terms about it:
In [Add.Code] to add a MSVBVM60.DLL = MSVBVM60.DLL (in VB6 as an example) is the following
MSVBVM60.DLL regions:
hook = MSVBVM60.cab_Installer
FileVersion = 6,0,81,76
FileVersion Obviously, the version number is not to say fat, on the hook to talk about it.
hook region is installed when the region need to implement, it is divided into two types of conditional, the other one is the unconditional, unconditional hook region must be implemented, on the contrary to determine whether under the conditions of implementation. To [Setup Hooks] tag unconditional regional areas, as follows
[Setup Hooks]
hookname = section-name

run =% EXTRACT_DIR% \ setup.exe
Unconditionally to the region through a common implementation of a inf file to install procedure, this is what we in the Explorer right-click on an inf file to install in the implementation of the reasons for such a menu of
Ie, when a cab file to download, if the file does not [Add.Code], were handled by the [Setup Hooks] region, run run the specified procedures,above is setup.exe;
Conditions of the region under certain conditions for the implementation of the front hook to the designated regional MSVBVM60.DLL is a condition of the region, if MSVBVM60.DLL specified version of the CLSID or can not meet the needs of the named file and there is no value specified in the implementation of hook region.
file-win32-x86 = http://activex.microsoft.com/controls/vb6/VBRun60.cab
run =% EXTRACT_DIR% \ VBRun60.exe
Above [MSVBVM60.cab_Installer] is a hook region, it also contains a file value, specify a URL, that URL from the MSVBVM60.DLL can be downloaded; run the implementation of which is illustrated in a document
There is a need to explain, MS for some commonly used Redistributable Microsoft DLLs
Can be designated for the CODEBASE attribute http://activex.microsoft.com/controls, such document in the cab on the need to include these documents in the computer, there is a dll file is redist.txt above Redistributable Microsoft DLLs

To create a cab file:
cabarc N ctrl1.cab ctrl1.inf ctrl1.dll
N to create a new document, ctrl1.cab is to create the file name, ctrl1.inf is the cab of the inf, but need to add the cab after the documents, you can use wildcards.
Cab and then you can put the page file on the
<OBJECT ID = "Ctrl1Obj"
CLASSID = "clsid :....................................."
CODEBASE = "http://server.com/ctrl1.cab # version = 8,0,0,5007">
There is also a version, but here refers to the version control version, which is the inf file in the version.

The production of electronic signatures:
First of all, from the following website to download tools for the production of signatures SignCode, address
Signed authorization from the center such as VeriSign or your LAN running Microsoft Certificate
Server authorize a server certificate, the process of applying for authorization you will get a private key.
MakeCert.exe and can also be used to create the private key Cert2Spc.exe testing method is the first to use X.509 to create a MakeCert the certificate (. Cer file)
MakeCert-sv MyKey.pvk n "CN = My software Company" MyCert.cer
Cert2Spc will then use. Cer file conversion software as a PKCS # 7 Release Certificate (. Spc file),
Cert2Spc MyCert.cer MyCert.spc
SignCode use you download the cab file to you for electronic signature
SignCode-spc MyCert.spc-v MyKey.pvk-t http://
timestamp.verisign.com / scripts / timstamp.dll ctrl1.cab
SignCode can also specify a number of other parameters, it said, too long,.
Although the test can be used. Cer and. Spc file, but when released, must apply.

In fact, there are things in the SDK that is E-man, however, take your time.

.Net Control and components Articles

Can't Find What You're Looking For?

Rating: Not yet rated


No comments posted.