[This is preliminary documentation and subject to change.]
The MsiGetFeatureCost function returns the disk space required by a feature and its selected children and parent features.
UINT MsiGetFeatureCost(
MSIHANDLE hInstall, // installer handle
LPCTSTR szFeature, // name of feature
MSICOSTTREE iCostTree, // portion of tree to cost
INSTALLSTATE iState, // requested state
INT *piCost // returned cost
);
Value | Meaning |
---|---|
MSICOSTTREE_CHILDREN | The children of the indicated feature are included in the cost. |
MSICOSTTREE_PARENTS | The parent features of the indicated feature are included in the cost. |
MSICOSTTREE_PRODUCT | Unsupported. |
MSICOSTTREE_SELFONLY | The feature only is included in the cost. |
Value | Meaning |
---|---|
INSTALLSTATE_UNKNOWN | The product or feature is unrecognized. |
INSTALLSTATE_ABSENT | The product or feature is uninstalled. |
INSTALLSTATE_LOCAL | The product or feature is installed on the local drive. |
INSTALLSTATE_SOURCE | The product or feature is installed to run from source, CD, or network. |
INSTALLSTATE_DEFAULT | The product or feature will be installed to use the default location: local or source. |
With the MsiGetFeatureCost function, the MSICOSTTREE_SELFONLY value indicates the total amount of disk space (in units of 512 bytes) required by the specified feature only. This returned value does not include the children or the parent features of the specified feature. This total cost is made up of the disk costs attributed to every component linked to the feature.
The MSICOSTTREE_CHILDREN value indicates the total amount of disk space (in units of 512 bytes) required by the specified feature and its children. For each feature, the total cost is made up of the disk costs attributed to every component linked to the feature.
The MSICOSTTREE_PARENTS value indicates the total amount of disk space (in units of 512 bytes) required by the specified feature and its parent features (up to the root of the Feature table). For each feature, the total cost is made up of the disk costs attributed to every component linked to the feature.
Windows NT: Requires version 4.0 or later. Available as a redistributable for Windows NT 4.0.
Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in msiquery.h.
Import Library: Use msi.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Database Access Reference, Installer Selection Functions