CPackage::SetVersion

The CPackage::SetVersion function sets version information for the specified package file.

BOOL SetVersion(
DWORD dwVersionMS, // most significant version number
DWORD dwVersionLS // least significant version number
);

Parameters

dwVersionMS
[in] A value which specifies the most significant package version number. Typically this value corresponds to the version of a product being updated with the patch package, with the high word as the product's major version number and the low word as the minor version number.
 
dwVersionLS
[in] A value which specifies the least significant package version number. Typically this value corresponds to the build number of a product being updated with the patch package.

Return Values

If the CPackage::SetVersion function succeeds, it will return a non-zero value.

If the function fails, it will return a value of zero. To get extended error information, call GetLastError.

Remarks

The package version number is for informational purposes only and does not affect the version information of files stored in the package, nor does it change how changes are applied on the target system.

The package version number can only be set if the package is opened for create or update access.

Requirements

Windows NT/2000/XP: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Include apatch.h.
Library: Use apatch32.lib.

See Also

CPackage::GetVersion