FeatureGetCost

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The FeatureGetCost function is obsolete. Use the FeatureGetCostEx function instead.

The FeatureGetCost function determines the total space, in kilobytes (KB), required on the target drive for the feature that is specified by szFeature. When determining required drive space, this function takes into account whether the feature is currently selected, whether any components associated with the feature are currently filtered by operating system or language, and the cluster size on the target drive.

Syntax

FeatureGetCost ( szFeatureSource, szFeature, szTargetDir, nvRequiredSpace );

Parameters

FeatureGetCost Parameters

Parameter

Description

szFeatureSource

Specifies the media name of the file media whose features have been specified for installation and uninstallation. Typically, you would pass the system variable MEDIA in this parameter.

szFeature

Specifies the feature for which you want to determine the total space that is required on the target drive.

szTargetDir

Specifies the drive that is used, or the path whose drive is used, in determining required drive space. Typically, you would pass the system variable TARGETDIR in this parameter.

nvRequiredSpace

Returns the required drive space, in KB.

Return Values

FeatureGetCost Return Values

Return Value

Description

0

Indicates that the function successfully determined the required drive space.

< 0

Indicates that the function could not determine the required drive space.

You can obtain the error message text associated with a large negative return value—for example, -2147024891 (0x80070005)—by calling FormatMessage.

See Also