err = NR_RegGetEntryString( vreg, key, CHKSTR, buf, sizeof(buf) ); if (err != REGERR_OK) return err;  storedCheck = atoi(buf);  err = vr_GetCheck(filepath, &calculatedCheck);
err = NR_RegGetEntryString( vreg, key, CHKSTR, buf, sizeof(buf) );
VR_INTERFACE(REGERR) VR_ValidateComponent(char *component_path){	REGERR err;	RKEY key;	char path[MAXREGPATHLEN];#if !defined(STANDALONE_REGISTRY) && defined(XP_UNIX)	HREG hreg;#else	RKEY rootkey;#endif#ifdef USE_CHECKSUM	char buf[MAXREGNAMELEN];	long calculatedCheck;	int storedCheck;#endif	err = vr_Init();	if (err != REGERR_OK)		return err;#if !defined(STANDALONE_REGISTRY) && defined(XP_UNIX)    err = vr_FindKey( component_path, &hreg, &key );#else    rootkey = PATH_ROOT(component_path);    err = NR_RegGetKey( vreg, rootkey, component_path, &key );#endif    if ( err != REGERR_OK )        return err;    err = VR_GetPath( component_path, sizeof(path), path );    if ( err != REGERR_OK ) {        if ( err == REGERR_NOFIND ) {            err = REGERR_NOPATH;        }        return err;    }    {        struct stat  statStruct;        if ( stat ( path, &statStruct ) != 0 ) {            err = REGERR_NOFILE;        }    }    if (err != REGERR_OK)        return err;#if defined(USE_CHECKSUM) && !defined(XP_UNIX)	err = NR_RegGetEntryString( vreg, key, CHKSTR, buf, sizeof(buf) );	if (err != REGERR_OK)		return err;	storedCheck = atoi(buf);	err = vr_GetCheck(filepath, &calculatedCheck);    if (err != REGERR_OK)        return err;	if (storedCheck != calculatedCheck)	{		/* printf("File %s checksum was %d, not %d as expected.\n", 			filepath, calculatedCheck, storedCheck);        */		return REGERR_BADCHECK;	}#endif /* USE_CHECKSUM */	return REGERR_OK;}	/* CheckEntry */