Changeset 68550 in vbox for trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibBalloon.cpp
- Timestamp:
- Aug 31, 2017 12:09:41 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibBalloon.cpp
r62521 r68550 30 30 *********************************************************************************************************************************/ 31 31 #include "VBGLR3Internal.h" 32 #include <iprt/string.h> 32 33 33 34 … … 41 42 VBGLR3DECL(int) VbglR3MemBalloonRefresh(uint32_t *pcChunks, bool *pfHandleInR3) 42 43 { 43 VBoxGuestCheckBalloonInfo Info; 44 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_CHECK_BALLOON, &Info, sizeof(Info)); 44 VBGLIOCCHECKBALLOON Info; 45 VBGLREQHDR_INIT(&Info.Hdr, CHECK_BALLOON); 46 int rc = vbglR3DoIOCtl(VBGL_IOCTL_CHECK_BALLOON, &Info.Hdr, sizeof(Info)); 45 47 if (RT_SUCCESS(rc)) 46 48 { 47 *pcChunks = Info.cBalloonChunks; 48 Assert(Info.fHandleInR3 == (uint32_t)false || Info.fHandleInR3 == (uint32_t)true || RT_FAILURE(rc)); 49 *pfHandleInR3 = Info.fHandleInR3 != false; 49 *pcChunks = Info.u.Out.cBalloonChunks; 50 *pfHandleInR3 = Info.u.Out.fHandleInR3 != false; 50 51 } 51 52 return rc; … … 63 64 VBGLR3DECL(int) VbglR3MemBalloonChange(void *pv, bool fInflate) 64 65 { 65 VBoxGuestChangeBalloonInfo Info; 66 Info.u64ChunkAddr = (uint64_t)((uintptr_t)pv); 67 Info.fInflate = fInflate; 68 return vbglR3DoIOCtl(VBOXGUEST_IOCTL_CHANGE_BALLOON, &Info, sizeof(Info)); 66 VBGLIOCCHANGEBALLOON Info; 67 VBGLREQHDR_INIT(&Info.Hdr, CHANGE_BALLOON); 68 Info.u.In.pvChunk = pv; 69 Info.u.In.fInflate = fInflate; 70 RT_ZERO(Info.u.In.abPadding); 71 return vbglR3DoIOCtl(VBGL_IOCTL_CHANGE_BALLOON, &Info.Hdr, sizeof(Info)); 69 72 } 70 73
Note:
See TracChangeset
for help on using the changeset viewer.