Packaging with CAB files


 

In the Cabinet Software Development Kit (also called Cabinet SDK, or CAB Development Kit) you will find the necessary tools to construct cabinet (.cab) files. The CAB SDK may be downloaded from:

 

http://msdn.microsoft.com/workshop/management/cab/cabdl.asp

 

The cabinet file that CODEBASE points to should contain the .ocx file and an .inf file that will control the installation of the ActiveX Control. Dependent DLLs that may already exist on the system, such as the MFC DLLs, should not be included in this cabinet file. Instead, the MFC DLLs, and other dependent DLLs, should be packaged in separate cabinet files and referenced by the control's .inf file.

The following example illustrates how to package the DBI Tech. ctExplorer control. The <OBJECT> tag to include the Spindial control in a Web page resembles the following:

 

<OBJECT ID="ctExplorer1" WIDTH=200 HEIGHT=200

CLASSID="CLSID:47F90A7D-8078-11D2-943F-B2CF5047AB02"

CODEBASE="https://www.dbi-tech.com/prod_ocx/ctexplorer.cab#Version=1,0,0,18 ">

<PARAM NAME="_Version" VALUE="65536">

</OBJECT>

 

In this case, ctExplorer.cab must contain two files, ctExplorer.OCX and ctExplorer.inf. The command to build this cabinet file is similar to the following depending on the path to your installation of the Cabinet Development Kit:

 

C:\CabDevKit\cabarc.exe N ctExplorer.CAB ctExplorer.OCX ctExplorer.INF