VirtualBox

Changeset 24866 in vbox for trunk


Ignore:
Timestamp:
Nov 23, 2009 12:49:24 PM (15 years ago)
Author:
vboxsync
Message:

VBoxService: Made file version lookup on Windows more quiet on default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp

    r23655 r24866  
    7676
    7777#ifdef RT_OS_WINDOWS
     78/** @todo return an iprt status code instead of BOOL */
    7879BOOL VBoxServiceGetFileString(const char* pszFileName,
    7980                              char* pszBlock,
     
    100101    if (!dwLen)
    101102    {
    102         VBoxServiceError("No file information found! File = %s, Error: %ld\n", pszFileName, GetLastError());
     103        /* Don't print this to release log -- this confuses people if a file
     104         * isn't present because it's optional / was not installed intentionally. */
     105        VBoxServiceVerbose(3, "No file information found! File = %s, Error: %Rrc\n",
     106            pszFileName, RTErrConvertFromWin32(GetLastError()));
    103107        return FALSE;
    104108    }
     
    107111    if (!lpData)
    108112    {
    109         VBoxServiceError("Could not allocate temp buffer!\n");
     113        VBoxServiceError("Could not allocate temp buffer for file string lookup!\n");
    110114        return FALSE;
    111115    }
     
    123127            memcpy(pszString, lpValue, uiSize);
    124128        }
    125         else VBoxServiceError("Could not query value!\n");
    126     }
    127     else VBoxServiceError("Could not get file version info!\n");
     129        else VBoxServiceVerbose(3, "No file string value for \"%s\" in file \"%s\" available!\n", pszBlock, pszFileName);
     130    }
     131    else VBoxServiceVerbose(3, "No file version table for file \"%s\" available!\n", pszFileName);
    128132
    129133    RTMemFree(lpData);
     
    132136
    133137
     138/** @todo return an iprt status code instead of BOOL */
    134139BOOL VBoxServiceGetFileVersion(const char* pszFileName,
    135140                               DWORD* pdwMajor,
     
    171176        if (!lpData)
    172177        {
    173             VBoxServiceError("Could not allocate temp buffer!\n");
     178            VBoxServiceError("Could not allocate temp buffer for file version string!\n");
    174179            return FALSE;
    175180        }
     
    183188                *pdwBuildNumber = HIWORD(pFileInfo->dwFileVersionLS);
    184189                *pdwRevisionNumber = LOWORD(pFileInfo->dwFileVersionLS);
     190                bRet = TRUE;
    185191            }
    186             else VBoxServiceError("Could not query file information value!\n");
     192            else VBoxServiceVerbose(3, "No file version value for file \"%s\" available!\n", pszFileName);
    187193        }
    188         else VBoxServiceError("Could not get file version info!\n");
     194        else VBoxServiceVerbose(3, "No file version struct for file \"%s\" available!\n", pszFileName);
    189195
    190196        RTMemFree(lpData);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette