The TWUGetVersionInfo function retrieves the fixed VERSIONINFO for a local file. This version information can be used for version comparisons prior to updates.
Tip: TWUCheckUpdateVersion combines the functionality of TWUGetVersionInfo with a version comparison. You might find it more convenient to use that function.
URESULT TWUGetVersionInfo(
const TCHAR *pszFilePath,
VS_FIXEDFILEINFO *pFFI
);
Delphi version:
function TWUGetVersionInfo(
pszFilePath: PTCHAR;
var pFFI: VS_FIXEDFILEINFO
): URESULT;
If the function succeeds, it returns ERROR_SUCCESS (0). If it fails, it returns a nonzero Win32 API error code. You can use TWUGetErrorMessage to retrieve the error message that corresponds to the error code.