GetNextPackageFile

The GetNextPackageFile function returns information about the next file in the package.

BOOL GetNextPackageFile(
HPACKAGE hPackage, // handle to package file
LPPACKAGE_FILE_INFORMATION lpFileInfo // file information
);

Parameters

hPackage
[in] Handle to an open package file.
 
lpFileInfo
[in/out] A pointer to a PACKAGE_FILE_INFORMATION structure that will contain information about the file. Note that the cbStructure member must be initialized to the size of the structure that is being passed to the function.

Return Values

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

The GetNextPackageFile function will return FALSE after the last file has been returned.

Files that have been deleted from the package will not be returned by this function.

Example

// Return information about all files in the package
PACKAGE_FILE_INFORMATION pfInfo;
BOOL bResult;

pfInfo.cbStructure = sizeof(PACKAGE_FILE_INFORMATION);
bResult = GetFirstPackageFile(hPackage, &pfInfo);

while (bResult)
{
      // Process the data in pfInfo which contains information
      // about the current file

      bResult = GetNextPackageFile(hPackage, &pfInfo);
}

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.

See Also

GetFirstPackageFile, FindNextPackageFile