The MapPointUtilities::GetPictureFromObject method returns an IPicture object. I try to save this picture to a stream, unfortunately unsuccessfull...
Any sugestions are welcome!
my code looks like this:
Code:CComPtr<MapPoint::_MapPointUtilities> pUtils(NULL); hr = pUtils.CoCreateInstance(__uuidof(MapPoint::MapPointUtilities)); if(SUCCEEDED(hr)) { LPDISPATCH pPictureDisp(NULL); hr = pUtils->GetPictureFromObject(m_pMappointMap, 640, 480, &pPictureDisp); if(SUCCEEDED(hr)) { long cbSize(0); IPicture* pPicture(NULL); hr = pPictureDisp->QueryInterface(__uuidof(IPicture), (void**)&pPicture); if(SUCCEEDED(hr)) { SHORT sType(0); hr = pPicture->get_Type(&sType); hr = pPicture->SaveAsFile(pStream, TRUE, &cbSize); } pPicture->Release(); } } pUtils.Release();