|
The PATCH_FILE_INFORMATION structure
contains information about the patch file, including details about the reference or update
files that were used to create the patch. This structure is used with the GetPatchFileInformation
function.
typedef struct _PATCH_FILE_INFORMATION
{
DWORD cbStructure;
DWORD dwPatchLevel;
DWORD dwPatchOptions;
DWORD dwPatchExpires;
DWORD dwPatchCompression;
DWORD dwFileSize;
DWORD dwFileAttributes;
DWORD dwFileChecksum;
DWORD dwFileVersionMS;
DWORD dwFileVersionLS;
FILETIME timeFileCreated;
FILETIME timeFileAccessed;
FILETIME timeFileModified;
} PATCH_FILE_INFORMATION;
Members
- cbStructure
- Specifies the size, in bytes, of this data structure. Set
this member to sizeof(PATCH_FILE_INFORMATION) before calling the GetPatchFileInformation
function.
-
- dwPatchLevel
- Specifies the patch level that was used to create the patch
file. This is a value between 1 and 9. See the CreatePatchFile function
for more information on the patch level.
-
- dwPatchOptions
- The options that were specified when the patch file was
created, and are used as the default set of options when the patch file is applied. See
the ApplyPatchFile function for more information about the patch options.
-
- dwPatchExpires
- The number of days until the patch file expires. If the
patch was created without any expiration, this value will be zero. Note that attempting to
get information about a patch file which has already expired will result in an error.
-
- dwPatchCompression
- The compression ratio for the patch file based on the size
of the updated file. This is expressed as an integer percentage value between 0 and 100.
-
- dwFileSize
- Specifies the length of the file at the time the patch was
created. Note that this is not the length of the patch file itself.
-
- dwFileAttributes
- Specifies the attributes of the file at the time the patch
was created.
-
- The attributes may be one or more of the following values:
| Attribute |
Meaning |
| FILE_ATTRIBUTE_ARCHIVE |
The file or directory is an archive file or
directory. Applications use this attribute to mark files for backup or removal. |
| FILE_ATTRIBUTE_HIDDEN |
The file or directory is hidden. It is not
included in an ordinary directory listing. |
| FILE_ATTRIBUTE_NORMAL |
The file or directory has no other attributes
set. This attribute is valid only if used alone. |
| FILE_ATTRIBUTE_READONLY |
The file or directory is read-only.
Applications can read the file but cannot write to it or delete it. |
| FILE_ATTRIBUTE_SYSTEM |
The file or directory is part of, or is used
exclusively by, the operating system. |
- dwFileChecksum
- Specifies a 32-bit CRC (cyclic redundancy checksum) value
which is derived from the contents of the file. This value can be used to uniquely
identify a file.
-
- dwFileVersionMS
- Specifies the most significant portion of the file version
at the time that the patch was created. If there was no version information available,
this value will be zero.
-
- dwFileVersionLS
- Specifies the least significant portion of the file version
at the time that the patch was created. If there was no version information available,
this value will be zero.
-
- timeFileCreated
- A FILETIME structure which contains the date and time that
the file was created. The time value is returned in UCT and should be converted to local
time when displayed. Note that not all file systems record the creation time for a file.
In this case, the FILETIME structure members will have zero values.
-
- timeFileAccessed
- A FILETIME structure which contains the date and time that
the file was last accessed. The time value is returned in UCT and should be converted to
local time when displayed. Note that not all file systems record the last access time for
a file. In this case, the FILETIME structure members will have zero values.
-
- timeFileModified
- A FILETIME structure which contains the date and time that
the file was last modified. The time value is returned in UCT and should be converted to
local time when displayed.
Remarks
Version information is only available for 32-bit
executables, dynamic link libraries, ActiveX controls and other Windows PE image modules.
The high word of the most significant version number is typically considered to be the
major version, while the low word is the minor version. The least significant version
number is commonly the build number. For example, an executable with a dwFileVersionMS
value of 65568 (10020h) and a dwFileVersionLS value of 1225 (4C9h) would be
considered to be Version 1.20 Build 1225.
Not all file systems can record creation and last access
time and not all file systems record them in the same manner. For example, on Windows NT
FAT, create time has a resolution of 10 milliseconds, write time has a resolution of 2
seconds, and access time has a resolution of 1 day (the access date). On NTFS, access time
has a resolution of 1 hour.
To convert the FILETIME values to a more usable format, use
the FileTimeToSystemTime function. To compare two file times, use the CompareFileTime
function. Both functions are part of the standard Windows API.
Requirements
Windows NT/2000/XP: Requires Windows NT 4.0 SP3 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in apatch.h.
See Also
ApplyPatchFile, CreatePatchFile, GetPatchFileInformation
|
|