VirtualBox

Changeset 10976 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Jul 30, 2008 11:53:26 AM (16 years ago)
Author:
vboxsync
Message:

HostServices/GuestProperties and Additions/common: reactivated autores

Location:
trunk/src/VBox/Additions/common
Files:
2 edited

Legend:

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

    r10931 r10976  
    3030#include <iprt/path.h>
    3131#include <iprt/initterm.h>
    32 #include <iprt/autores>
     32#include <iprt/autores.h>
    3333#include <VBox/log.h>
    3434#include <VBox/VBoxGuest.h>
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp

    r10957 r10976  
    2828#include <iprt/mem.h>
    2929#include <iprt/assert.h>
    30 #if 0 /** @todo this isn't work. As noted elsewhere, avoid complicated templates. */
    31 # include <iprt/autores>
    32 #endif
     30#include <iprt/autores.h>
    3331#include <iprt/stdarg.h>
    3432#include <VBox/log.h>
     
    534532                                    char **ppszFlags)
    535533{
    536 #if 1 /* the RTMemAutoPtr doesn't compile */
    537     return VERR_NOT_IMPLEMENTED;
    538 #else
    539534    int rc = VINF_SUCCESS;
    540     RTMemAutoPtr<VBGLR3GUESTPROPENUM, VbglR3GuestPropEnumFree> pHandle;
    541     pHandle = reinterpret_cast<PVBGLR3GUESTPROPENUM>(
    542                                       RTMemAllocZ(sizeof(VBGLR3GUESTPROPENUM))
    543                                                     );
    544     if (NULL == pHandle.get())
     535    RTMemAutoPtr<VBGLR3GUESTPROPENUM, VbglR3GuestPropEnumFree> apHandle;
     536    apHandle = reinterpret_cast<PVBGLR3GUESTPROPENUM>(
     537                                       RTMemAllocZ(sizeof(VBGLR3GUESTPROPENUM))
     538                                                     );
     539    if (NULL == apHandle.get())
    545540        rc = VERR_NO_MEMORY;
    546541
     
    586581    {
    587582        /* Transfer ownership of the buffer to the handle structure. */
    588         pHandle->pchBuf = pchBuf.release();
    589         pHandle->cchBuf = cchBuf;
    590     }
    591     if (RT_SUCCESS(rc))
    592         rc = VbglR3GuestPropEnumNext(pHandle.get(), ppszName, ppszValue,
     583        apHandle->pchBuf = pchBuf.release();
     584        apHandle->cchBuf = cchBuf;
     585    }
     586    if (RT_SUCCESS(rc))
     587        rc = VbglR3GuestPropEnumNext(apHandle.get(), ppszName, ppszValue,
    593588                                     pu64Timestamp, ppszFlags);
    594589    if (RT_SUCCESS(rc) && (NULL == ppszName))
     
    597592    /* And transfer ownership of the handle to the caller. */
    598593    if (RT_SUCCESS(rc))
    599         *ppHandle = pHandle.release();
    600     return rc;
    601 #endif
     594        *ppHandle = apHandle.release();
     595    return rc;
    602596}
    603597
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