Hi!
I'm new to Virtualbox Development. I have a few problems when i use
virtualbox sdk.
IMedium* pIMedium = NULL;
rc = IMediumAttachmentVector[j]->get_Medium(&pIMedium);
if(SUCCEEDED(rc) && pIMedium)
{
IMedium* BaseMedium = NULL;
rc = pIMedium->get_Base(&BaseMedium);
if(SUCCEEDED(rc) && BaseMedium)
{
BSTR bstrName;
BaseMedium->get_Name(&bstrName);
LONG64 aLogicalSize = 0;
if(Device.Type == DeviceType_HardDisk)
{
rc = pIMedium->get_LogicalSize(&aLogicalSize);
//here can't get the real size, always zero
}
else
{
rc = pIMedium->get_Size(&aLogicalSize);
}
SAFE_RELEASE(BaseMedium);
}
SAFE_RELEASE(pIMedium);
}
The API "get_LogicalSize" can't get the real size ,it is always zero and return
value is ok. but when i open virtualbox (virtualbox.exe) , the function Execute
successfully and get the real size. Does it need some preconditions ?
_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev