Freetutes.com

VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

VB .NET - Learn Visual Basic .NET

Systems Analysis - System analysis and Design tutorial for Software Engineering


You are here: Visual Basic > Advanced VB6 tutorial > Chapter 21

Dependency Information in DEP Files

When Package and Deployment Wizard includes a file in your project’s setup, that file might also require the presence of other, supporting files on the user’s system to run properly.

Certain Windows common controls (listed in the Project, Components dialog box as Microsoft Windows Common Controls-3) that are implemented in the file COMCT332.OCX, also require other files to run properly.

Package and Deployment Wizard can include these additional files in the setup if each component that it needs to distribute has an accompanying dependency (.DEP extension) file.

A dependency file is a text file with the same name (but a different extension, of course) as the file whose dependencies it describes. The contents of a dependency file look like an INI file: section headers set off by square brackets ([ ])and individual key entries of the format Keyname=value.

The dependency file for the Windows common controls that are implemented in COMCT332.OCX is named COMCT332.DEP, for example. Listing 21.3 shows some of the opening and closing lines from that file.

LISTING 21.3
PART OF A TYPICAL DEPENDENCY FILE

[Version]
Version=6.0.0.8096
[msvbvm60.dll]
Register=$(DLLSelfRegister)
Dest=$(WinSysPathSysFile)
Version=6.0.80.91
CABFilename=MSVBVM60.cab
CABDefaultURL=http://activex.microsoft.com/controls/vb6
CABINFFile=MSVBVM60.inf
Uses1=
[STDOLE2.TLB]
Register=$(TLBRegister)
Dest=$(WinSysPathSysFile)
Version=2.30.4256.1
CABFilename=
CABDefaultURL=
CABINFFile=
CABRunFile=
Uses1=OleAut32.dll
Uses2=OlePro32.dll
Uses3=AsycFilt.dll
Uses4=
;...other information omitted for clarity
; Localized Dependencies -------------------------------------
; ** German (DE) ***
; (0007 = German)
;
[COMCT332.OCX <0007>]
Uses1=CmCt3DE.dll
Uses2=
;...other localized dependencies follow (French, Japanese, etc.)

If a component of your setup has an accompanying DEP file, Package and Deployment Wizard can include the other files that the component needs in the final setup.

If Package and Deployment Wizard can’t find a component’s DEP file, it will warn you. You can still continue to create the setup, but the distributed version of your application might not run on a user’s system if the component requires other files (such as DLLs) to run, and if these files are missing from the user’s system.

Package and Deployment Wizard also reads the dependency file named VB6DEP.INI to be sure that it is distributing all the files needed by the VB6 runtime environment.

Microsoft recommends that you always generate a dependency file for an application that you are distributing, especially if the application is a COM component: If future applications use your component, you will need to supply dependency information for your component for those applications’ setups to function correctly.

Your application’s DEP file will normally be a compendium of all the DEP files that Package and Deployment Wizard found for your application’s various components, as well as the contents of the VB6DEP.INI file.

NOTE - Modifying VB6DEP.INI : If you have additional files that you want to distribute to your users with every VBbased product that you install, you can add the information about these files to the VB6DEP.INI file on your development machine. To enable bidirectional text display features for VB applications running under versions of Windows that support this feature (such as Arabic Windows), for instance, you can add an entry for VBAME.DLL to VB6DEP.INI.

NOTE - VB Dependency Filename in Other Versions of VB : Previous versions of VB also provide dependency information for Package and Deployment Wizard, but the name of the dependency file for these earlier versions varies. The VB5 dependency file has a similar name to the VB6 filename, and the dependency filename for earlier versions of VB is SWDEPEND.INI.


  

<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © Freetutes.com | All Rights Reserved