RegisterPackageCallback

The RegisterPackageCallback function registers a function which is periodically called as the package file is modified or the contents are applied on the local system.

BOOL RegisterPackageCallback(
HPACKAGE hPackage, // handle to package file
LPPATCHSTATUSPROC lpfnCallback, // pointer to callback function
LPARAM lParam // callback function parameter
);

Parameters

hPackage
[in] Handle to an open package file.
 
lpfnCallback
[in] Specifies the address of a callback function of type LPPATCHSTATUSPROC that is called each time a change is made to the package file. This parameter can be NULL.
 
For more information on the progress callback function, see PatchStatusProc.
 
lParam
[in] A 32-bit user-defined parameter that is passed through the callback function. If no callback function has been specified, this parameter should be zero.

Return Values

If the RegisterPackageCallback 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

To disable callbacks, pass a NULL pointer as the address of the callback 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.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000/XP.