The CPackage::GetFirstFile function
returns information about the first file in the package.
| BOOL GetFirstFile( |
|
LPPACKAGE_FILE_INFORMATION
lpFileInfo |
|
// file information |
| ); |
Parameters
- 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 CPackage::GetFirstFile
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 CPackage::GetFirstFile function
will return FALSE if the package does not contain any files.
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 = GetFirstFile(hPackage, &pfInfo);
while (bResult)
{
// Process the data in pfInfo which contains information
// about the current file
bResult = GetNextFile(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
CPackage::FindFirstFile,
CPackage::GetNextFile
|