| 280 | } |
| 281 | |
| 282 | HRESULT __stdcall DataObject::SetData(FORMATETC *pFormatEtc,STGMEDIUM *pMedium,BOOL fRelease) |
| 283 | { |
| 284 | if(pFormatEtc == NULL || pMedium == NULL) |
| 285 | { |
| 286 | return E_INVALIDARG; |
| 287 | } |
| 288 | |
| 289 | DataObjectInternal dao; |
| 290 | |
| 291 | dao.fe = *pFormatEtc; |
| 292 | |
| 293 | if(fRelease) |
| 294 | { |
| 295 | dao.stg = *pMedium; |
| 296 | } |
| 297 | else |
| 298 | { |
| 299 | BOOL bRet = DuplicateStorageMedium(&dao.stg,pMedium,pFormatEtc); |
| 300 | |
| 301 | if(!bRet) |
| 302 | { |
| 303 | return E_OUTOFMEMORY; |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | m_daoList.push_back(dao); |
| 308 | |
| 309 | return S_OK; |
| 310 | } |
| 311 | |
| 312 | HRESULT __stdcall DataObject::EnumFormatEtc(DWORD dwDirection,IEnumFORMATETC **ppEnumFormatEtc) |
| 313 | { |
no outgoing calls