CPackage::GetExpiration

The CPackage::GetExpiration function returns the number of days that the package can be applied.

BOOL GetExpiration(
LPDWORD lpdwExpires // expiration period
);

Parameters

lpdwExpires
[out] A pointer to a DWORD value which will contain the number of days before the package expires. A value of zero specifies that the package will never expire.

Return Values

If the CPackage::GetExpiration 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

Once a package has expired, it cannot be opened or applied on a target system. Along with protecting the package with a password, this provides a mechanism for controlling the distribution of the package.

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::SetExpiration