dfOpenCmpByNames Function
Summary
dfOpenCmpByNames creates new comparing context for two files, names of these file are set in parameters szOldFileName and szNewFileName.
Syntax
int dfOpenCmpByNames (
_TCHAR const *
szOldFileName,
_TCHAR const *
szNewFileName,
int
bExtractPEVersions,
PTDfCmp *
ppCmp );
Arguments
szOldFileName
[Input]
A pointer to a null-terminated string that specifies the name of an old file.
Can be NULL or empty string.
szNewFileName
[Input]
A pointer to a null-terminated string that specifies the name of a new file.
Can be NULL or empty string.
bExtractPEVersions
[Input]
Flag which specifies whether an attempt to obtain a version number (which may be stored in the PE-file resources) will be maid.
If value of bExtractPEVersions is not equal to "0", then this attempt is maid and if succeed, then pointers on file version numbers are saved (in a text format) in the fields of the difference context szOldVersionID and szNewVersionID.
ppCmp
[Output]
Pointer on variable of PTDfCmp type, which contains a pointer on the comparing context created in case of successful function termination.
Return Values
If the function succeeds, the return value is zero (EDF_SUCCESS).
If the function fails, the return value is one of the following:
- EDF_BAD_PARAM
- EDF_OPEN_ERROR (in case of error opening of an old file)
- EDF_NEW_OPEN_ERROR
- EDF_OUT_OF_MEMORY
- EDF_SYSERROR
- EDF_FATAL
Remarks
Filling of the context structure fields during the process of comparing context creating is processed subject to values of attributes of the compared files (see TDfCmp structure description for details).
Successfully created comparing context can be used later on when calling functions dfCompare, dfBuildN and dfBuildH.
Name of an old or new file can be skipped (i.e. set to NULL or left an empty string), but not both concurrently.
NOTE: Use function dfCloseCmp to delete the context and to free associated resources. |