VirtualBox

Changeset 13835 in vbox for trunk/src/VBox/Main/win


Ignore:
Timestamp:
Nov 5, 2008 2:34:43 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38826
Message:

s/VBOX_SUCCESS/RT_SUCCESS/g s/VBOX_FAILURE/RT_FAILURE/g - VBOX_SUCCESS and VBOX_FAILURE have *NOT* been retired (because old habbits die hard) just sligtly deprecated.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/win/svchlp.cpp

    r8155 r13835  
    3838 *  FALSE... This method ensures that at least VERR_GENERAL_FAILURE is returned
    3939 *  in cases like that. Intended to be called immediately after a failed API
    40  *  call. 
     40 *  call.
    4141 */
    4242static inline int rtErrConvertFromWin32OnFailure()
     
    4444    DWORD err = GetLastError();
    4545    return err == NO_ERROR ? VERR_GENERAL_FAILURE
    46                            : RTErrConvertFromWin32 (err); 
     46                           : RTErrConvertFromWin32 (err);
    4747}
    4848
     
    9797
    9898    Bstr pipeName = Utf8StrFmt ("\\\\.\\pipe\\%s", aName);
    99    
     99
    100100    HANDLE pipe = CreateFile (pipeName,
    101101                              GENERIC_READ | GENERIC_WRITE,
     
    114114    mWriteEnd = pipe;
    115115    mName = aName;
    116    
     116
    117117    return VINF_SUCCESS;
    118118}
     
    148148        mReadEnd = NULL;
    149149    }
    150        
     150
    151151    mIsOpen = false;
    152152    mIsServer = false;
    153153    mName.setNull();
    154  
     154
    155155    return VINF_SUCCESS;
    156156}
     
    174174    if (!mIsOpen)
    175175        return VERR_WRONG_ORDER;
    176    
     176
    177177    /* write -1 for NULL strings */
    178178    if (aVal.isNull())
    179179        return write ((size_t) ~0);
    180    
     180
    181181    size_t len = aVal.length();
    182    
     182
    183183    /* write string length */
    184184    int vrc = write (len);
    185     if (VBOX_SUCCESS (vrc))
     185    if (RT_SUCCESS (vrc))
    186186    {
    187187        /* write string data */
     
    216216    if (!mIsOpen)
    217217        return VERR_WRONG_ORDER;
    218    
     218
    219219    size_t len = 0;
    220    
     220
    221221    /* read string length */
    222222    int vrc = read (len);
    223     if (VBOX_FAILURE (vrc))
     223    if (RT_FAILURE (vrc))
    224224        return vrc;
    225    
     225
    226226    /* length -1 means a NULL string */
    227227    if (len == (size_t) ~0)
     
    230230        return VINF_SUCCESS;
    231231    }
    232    
     232
    233233    aVal.alloc (len + 1);
    234234    aVal.mutableRaw() [len] = 0;
    235    
     235
    236236    /* read string data */
    237237    vrc = read (aVal.mutableRaw(), len);
     
    244244    Utf8Str guidStr;
    245245    int vrc = read (guidStr);
    246     if (VBOX_SUCCESS (vrc))
     246    if (RT_SUCCESS (vrc))
    247247        aGuid = Guid (guidStr);
    248248    return vrc;
     
    259259    int vrc = VINF_SUCCESS;
    260260    SVCHlpMsg::Code msgCode = SVCHlpMsg::Null;
    261    
     261
    262262    do
    263     { 
     263    {
    264264        vrc = read (msgCode);
    265         if (VBOX_FAILURE (vrc))
     265        if (RT_FAILURE (vrc))
    266266            return vrc;
    267        
     267
    268268        /* terminate request received */
    269269        if (msgCode == SVCHlpMsg::Null)
     
    283283                    VERR_GENERAL_FAILURE);
    284284        }
    285        
    286         if (VBOX_FAILURE (vrc))
     285
     286        if (RT_FAILURE (vrc))
    287287            return vrc;
    288288    }
    289289    while (1);
    290    
     290
    291291    /* we never get here */
    292292    AssertFailed();
  • trunk/src/VBox/Main/win/svcmain.cpp

    r13580 r13835  
    243243                vrc = VERR_INVALID_PARAMETER;
    244244
    245             if (VBOX_SUCCESS (vrc))
     245            if (RT_SUCCESS (vrc))
    246246            {
    247247                /* do the helper job */
    248248                SVCHlpServer server;
    249249                vrc = server.open (pipeName);
    250                 if (VBOX_SUCCESS (vrc))
     250                if (RT_SUCCESS (vrc))
    251251                    vrc = server.run();
    252252            }
    253             if (VBOX_FAILURE (vrc))
     253            if (RT_FAILURE (vrc))
    254254            {
    255255                Utf8Str err = Utf8StrFmt (
Note: See TracChangeset for help on using the changeset viewer.

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