Changeset 41595 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Jun 6, 2012 9:58:30 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r41528 r41595 6024 6024 *aHeight = u32Height; 6025 6025 6026 HRESULT rc = S_OK; 6026 6027 uint8_t *pu8PNG = NULL; 6027 6028 uint32_t cbPNG = 0; … … 6029 6030 uint32_t cyPNG = 0; 6030 6031 6031 DisplayMakePNG(pu8Data, u32Width, u32Height, &pu8PNG, &cbPNG, &cxPNG, &cyPNG, 0); 6032 6033 com::SafeArray<BYTE> screenData(cbPNG); 6034 screenData.initFrom(pu8PNG, cbPNG); 6035 RTMemFree(pu8PNG); 6036 6037 screenData.detachTo(ComSafeArrayOutArg(aData)); 6032 vrc = DisplayMakePNG(pu8Data, u32Width, u32Height, &pu8PNG, &cbPNG, &cxPNG, &cyPNG, 0); 6033 6034 if (RT_SUCCESS(vrc)) 6035 { 6036 com::SafeArray<BYTE> screenData(cbPNG); 6037 screenData.initFrom(pu8PNG, cbPNG); 6038 if (pu8PNG) 6039 RTMemFree(pu8PNG); 6040 screenData.detachTo(ComSafeArrayOutArg(aData)); 6041 } 6042 else 6043 { 6044 if (pu8PNG) 6045 RTMemFree(pu8PNG); 6046 return setError(VBOX_E_IPRT_ERROR, 6047 tr("Could not convert screenshot to PNG (%Rrc)"), 6048 vrc); 6049 } 6038 6050 6039 6051 freeSavedDisplayScreenshot(pu8Data); 6040 6052 6041 return S_OK;6053 return rc; 6042 6054 } 6043 6055
Note:
See TracChangeset
for help on using the changeset viewer.