VirtualBox

Changeset 21734 in vbox for trunk/src/VBox/Main/HostImpl.cpp


Ignore:
Timestamp:
Jul 21, 2009 10:04:46 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50309
Message:

API: implement IHost::GetProcessorDescription

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/HostImpl.cpp

    r21686 r21734  
    932932 * @param   description address of result variable, empty string if not known or aCpuId is invalid.
    933933 */
    934 STDMETHODIMP Host::GetProcessorDescription(ULONG /* aCpuId */, BSTR *aDescription)
     934STDMETHODIMP Host::GetProcessorDescription(ULONG aCpuId, BSTR *aDescription)
    935935{
    936936    CheckComArgOutPointerValid(aDescription);
    937937    AutoWriteLock alock (this);
    938938    CHECK_READY();
    939     /** @todo */
    940     ReturnComNotImplemented();
     939
     940    char szCPUModel[80];
     941    int vrc = RTMpGetDescription(aCpuId, szCPUModel, sizeof(szCPUModel));
     942    if (RT_FAILURE(vrc))
     943        return E_FAIL; /** @todo error reporting? */
     944    Bstr (szCPUModel).cloneTo (aDescription);
     945    return S_OK;
    941946}
    942947
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