The SetPackageExpiration function
specifies the number of days that the package can be applied.
| BOOL
SetPackageExpiration( |
|
HPACKAGE hPackage, |
|
// handle to package file |
|
DWORD dwExpires |
|
// expiration period |
| ); |
Parameters
- hPackage
- [in] Handle to an open package file.
-
- dwExpires
- [in] Specifies the number of days that the package may be
accessed before it expires. A value of zero specifies that the package will never expire.
Return Values
If the SetPackageExpiration 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
GetPackageExpiration
|