Changeset 10976 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Jul 30, 2008 11:53:26 AM (16 years ago)
- Location:
- trunk/src/VBox/Additions/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp
r10931 r10976 30 30 #include <iprt/path.h> 31 31 #include <iprt/initterm.h> 32 #include <iprt/autores >32 #include <iprt/autores.h> 33 33 #include <VBox/log.h> 34 34 #include <VBox/VBoxGuest.h> -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
r10957 r10976 28 28 #include <iprt/mem.h> 29 29 #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> 33 31 #include <iprt/stdarg.h> 34 32 #include <VBox/log.h> … … 534 532 char **ppszFlags) 535 533 { 536 #if 1 /* the RTMemAutoPtr doesn't compile */537 return VERR_NOT_IMPLEMENTED;538 #else539 534 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()) 545 540 rc = VERR_NO_MEMORY; 546 541 … … 586 581 { 587 582 /* 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, 593 588 pu64Timestamp, ppszFlags); 594 589 if (RT_SUCCESS(rc) && (NULL == ppszName)) … … 597 592 /* And transfer ownership of the handle to the caller. */ 598 593 if (RT_SUCCESS(rc)) 599 *ppHandle = pHandle.release(); 600 return rc; 601 #endif 594 *ppHandle = apHandle.release(); 595 return rc; 602 596 } 603 597
Note:
See TracChangeset
for help on using the changeset viewer.