VirtualBox

Changeset 27159 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 8, 2010 11:56:29 AM (15 years ago)
Author:
vboxsync
Message:

Main: use HRESULT properly

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

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

    r27129 r27159  
    146146/////////////////////////////////////////////////////////////////////////////
    147147
    148 int Mouse::getVMMDevMouseCaps(uint32_t *pfCaps)
     148HRESULT Mouse::getVMMDevMouseCaps(uint32_t *pfCaps)
    149149{
    150150    AssertPtrReturn(pfCaps, E_POINTER);
     
    158158}
    159159
    160 int Mouse::setVMMDevMouseCaps(uint32_t fCaps)
     160HRESULT Mouse::setVMMDevMouseCaps(uint32_t fCaps)
    161161{
    162162    VMMDev *pVMMDev = mParent->getVMMDev();
     
    269269 * @returns   COM status code
    270270 */
    271 int Mouse::reportRelEventToMouseDev(int32_t dx, int32_t dy, int32_t dz,
    272                                     int32_t dw, uint32_t fButtons)
     271HRESULT Mouse::reportRelEventToMouseDev(int32_t dx, int32_t dy, int32_t dz,
     272                                        int32_t dw, uint32_t fButtons)
    273273{
    274274    if (dx || dy || dz || dw || fButtons != mLastButtons)
     
    300300 * @returns   COM status code
    301301 */
    302 int Mouse::reportAbsEventToMouseDev(uint32_t mouseXAbs, uint32_t mouseYAbs,
    303                                     int32_t dz, int32_t dw, uint32_t fButtons)
     302HRESULT Mouse::reportAbsEventToMouseDev(uint32_t mouseXAbs, uint32_t mouseYAbs,
     303                                        int32_t dz, int32_t dw, uint32_t fButtons)
    304304{
    305305    if (   mouseXAbs != mLastAbsX || mouseYAbs != mLastAbsY
     
    332332 * @returns   COM status code
    333333 */
    334 int Mouse::reportAbsEventToVMMDev(uint32_t mouseXAbs, uint32_t mouseYAbs)
     334HRESULT Mouse::reportAbsEventToVMMDev(uint32_t mouseXAbs, uint32_t mouseYAbs)
    335335{
    336336    VMMDev *pVMMDev = mParent->getVMMDev();
     
    396396 * @returns   COM status value
    397397 */
    398 int Mouse::convertDisplayWidth(LONG x, uint32_t *pcX)
     398HRESULT Mouse::convertDisplayWidth(LONG x, uint32_t *pcX)
    399399{
    400400    AssertPtrReturn(pcX, E_POINTER);
     
    415415 * @returns   COM status value
    416416 */
    417 int Mouse::convertDisplayHeight(LONG y, uint32_t *pcY)
     417HRESULT Mouse::convertDisplayHeight(LONG y, uint32_t *pcY)
    418418{
    419419    AssertPtrReturn(pcY, E_POINTER);
     
    532532               fRelDev = true;
    533533        }
    534     if (RT_SUCCESS(getVMMDevMouseCaps(&u32MouseCaps)))
     534    if (SUCCEEDED(getVMMDevMouseCaps(&u32MouseCaps)))
    535535        fVMMDevCanAbs =    (u32MouseCaps & VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE)
    536536                        && fRelDev;
  • trunk/src/VBox/Main/include/MouseImpl.h

    r27129 r27159  
    123123    static DECLCALLBACK(void)   drvDestruct(PPDMDRVINS pDrvIns);
    124124
    125     int getVMMDevMouseCaps(uint32_t *pfCaps);
    126     int setVMMDevMouseCaps(uint32_t fCaps);
    127     int reportRelEventToMouseDev(int32_t dx, int32_t dy, int32_t dz,
     125    HRESULT getVMMDevMouseCaps(uint32_t *pfCaps);
     126    HRESULT setVMMDevMouseCaps(uint32_t fCaps);
     127    HRESULT reportRelEventToMouseDev(int32_t dx, int32_t dy, int32_t dz,
    128128                                 int32_t dw, uint32_t fButtons);
    129     int reportAbsEventToMouseDev(uint32_t mouseXAbs, uint32_t mouseYAbs,
     129    HRESULT reportAbsEventToMouseDev(uint32_t mouseXAbs, uint32_t mouseYAbs,
    130130                                 int32_t dz, int32_t dw, uint32_t fButtons);
    131     int reportAbsEventToVMMDev(uint32_t mouseXAbs, uint32_t mouseYAbs);
    132     int convertDisplayWidth(LONG x, uint32_t *pcX);
    133     int convertDisplayHeight(LONG y, uint32_t *pcY);
     131    HRESULT reportAbsEventToVMMDev(uint32_t mouseXAbs, uint32_t mouseYAbs);
     132    HRESULT convertDisplayWidth(LONG x, uint32_t *pcX);
     133    HRESULT convertDisplayHeight(LONG y, uint32_t *pcY);
    134134
    135135    void sendMouseCapsNotifications(void);
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