本文整理汇总了C++中Guest::COMGETTER方法的典型用法代码示例。如果您正苦于以下问题:C++ Guest::COMGETTER方法的具体用法?C++ Guest::COMGETTER怎么用?C++ Guest::COMGETTER使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Guest
的用法示例。
在下文中一共展示了Guest::COMGETTER方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: vmmdevQueryBalloonSize
/**
* Query the current balloon size
*
* @returns VBox status code.
* @param pInterface Pointer to this interface.
* @param pcbBalloon Balloon size
* @thread The emulation thread.
*/
DECLCALLBACK(int) vmmdevQueryBalloonSize(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pcbBalloon)
{
PDRVMAINVMMDEV pDrv = RT_FROM_MEMBER(pInterface, DRVMAINVMMDEV, Connector);
Console *pConsole = pDrv->pVMMDev->getParent();
ULONG val = 0;
if (!pcbBalloon)
return VERR_INVALID_POINTER;
/* store that information in IGuest */
Guest* guest = pConsole->i_getGuest();
AssertPtrReturn(guest, VERR_GENERAL_FAILURE);
guest->COMGETTER(MemoryBalloonSize)(&val);
*pcbBalloon = val;
return VINF_SUCCESS;
}
示例2: vmmdevQueryStatisticsInterval
/**
* Request the statistics interval
*
* @returns VBox status code.
* @param pInterface Pointer to this interface.
* @param pulInterval Pointer to interval in seconds
* @thread The emulation thread.
*/
DECLCALLBACK(int) vmmdevQueryStatisticsInterval(PPDMIVMMDEVCONNECTOR pInterface, uint32_t *pulInterval)
{
PDRVMAINVMMDEV pDrv = PDMIVMMDEVCONNECTOR_2_MAINVMMDEV(pInterface);
Console *pConsole = pDrv->pVMMDev->getParent();
ULONG val = 0;
if (!pulInterval)
return VERR_INVALID_POINTER;
/* store that information in IGuest */
Guest* guest = pConsole->getGuest();
Assert(guest);
if (!guest)
return VERR_GENERAL_FAILURE;
guest->COMGETTER(StatisticsUpdateInterval)(&val);
*pulInterval = val;
return VINF_SUCCESS;
}