fTWUPackageCB
The fTWUPackageCB typedef defines the prototype for the callback function used by TWUEnumPackages and TWUEnumPackageDependencies.
typedef URESULT (*fTWUPackageCB)( TWUHANDLE hSession, TWUPackageData *pPackage, LPARAM lCookie );
Delphi version:
type fTWUPackageCB = function( hSession: TWUHANDLE; pPackage: PTWUPackageData; lCookie: LPARAM ): URESULT;
Parameters
- hSession
- [Input] Handle to an open TWU session.
- pPackage
- [Input] Pointer to the package data that is being enumerated.
- lCookie
- [Input] User-defined value that was passed in to TWUEnumPackages or TWUEnumPackageDependencies. You can use this cookie to pass additional information to the callback function.
Return value
If the function succeeds, it must return ERROR_SUCCESS (0) to continue the enumeration. If it fails or if you want to terminate the enumeration for some reason, the function must return a nonzero Win32 error code. In that case, the enumeration will be terminated and TWUEnumPackages or TWUEnumPackageDependencies will return pPackage. The error code itself will be returned through the puResult parameter of those functions.