CPackage::GetVersion

The CPackage::GetVersion function returns version information for the specified package file.

BOOL GetVersion(
LPDWORD lpdwVersionMS, // most signficant version number
LPDWORD lpdwVersionLS // least significant version number
);

Parameters

lpdwVersionMS
[out] A pointer to a value which will contain the most significant portion of the package version number.
 
lpdwVersionLS
[out] A pointer to a value which will contain the least significant portion of the package version number.

Return Values

If the CPackage::GetVersion 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 CPackage::GetVersion function is useful for determining if an update has already been installed on the local system. The current version of the application can be stored on the local system, typically in a registry key value, and then compared against the version information for the package.

To change the package version use the CPackage::SetVersion function.

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::GetProperty, CPackage::SetVersion