TWUEnumPackages
The TWUEnumPackages function enumerates all packages from the package information file.
TWUPackageData * TWUEnumPackages( TWUHANDLE hSession, fTWUPackageCB pCallback, LPARAM lCookie, URESULT *puResult );
Delphi version:
function TWUEnumPackages( hSession: TWUHANDLE; pCallback: fTWUPackageCB; lCookie: LPARAM; var puResult: URESULT ): PTWUPackageData;
Parameters
- hSession
- [Input] Handle to an open TWU session.
- pCallback
- [Input] Pointer to the callback function that will be called once for each enumerated package.
- lCookie
- [Input] User-defined value that will be passed unchanged to the callback function. You can use this cookie to pass additional information to the callback function.
- puResult
- [Output, optional] Pointer to a variable that receives the nonzero error code if the enumeration was terminated prematurely, or ERROR_SUCCESS (0) if all packages were enumerated. If this parameter is NULL, no result code is returned.
Return value
The function returns a pointer to the package that caused the enumeration to fail (by returning a nonzero result from the callback function), or NULL if all or no packages were enumerated. If all packages were enumerated, *puResult will contain ERROR_SUCCESS; if no packages were enumerated, *puResult will contain a nonzero error code.