LIBDF Functions: dfOpenCmpByHandles

Summary

 

dfOpenCmpByNames creates new comparing context for two files, descriptors for these files are set in parameters hOldFile and hNewFile.

 

Syntax

 

int dfOpenCmpByHandles (

 

FD_T

hOldFile,

FD_T

hNewFile,

PTDfCmp *

ppCmp );

 

Arguments

 

hOldFile

[Input]

Descriptor of an old file, created by function CreateFile().

May be INVALID_FD_VALUE value, if old file is skipped.

 

hNewFile

[Input]

Descriptor of a new file, created by function CreateFile().

May be INVALID_FD_VALUE value, if new file is skipped.

 

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_OUT_OF_MEMORY

EDF_SYSERROR

EDF_FATAL

 

Remarks

 

Filling of the context structure fields during the process of difference context creating is processed subject to values of attributes of the compared files (see TDfCmp structure description for details). Fields szOldFileName, szNewFileName, szOldVersionID and szNewVersionID are left empty. You can set values for these fields on your own.

 

Successfully created comparing context can be used later on when calling functions dfCompare, dfBuildN and dfBuildH.

One of files whether an old or a new one can be skipped (value of the descriptor INVALID_FD_VALUE), but not both concurrently.

 

NOTE: Use function dfCloseCmp to delete the context and to free associated resources.

 

See also

TDfCmp, dfOpenCmpByNames, dfCompare, dfCloseCmp

 

Converted from CHM to HTML with chm2web Standard 2.75 (unicode)