| 292 | } |
| 293 | |
| 294 | STDMETHODIMP CDataObject::QueryGetData(LPFORMATETC pformatetc) { |
| 295 | // This method is called by the drop target to check whether the source |
| 296 | // provides data is a format that the target accepts. |
| 297 | if (pformatetc->cfFormat == m_filedescriptorID && pformatetc->tymed & TYMED_HGLOBAL) |
| 298 | return ResultFromScode(S_OK); |
| 299 | if (pformatetc->cfFormat == m_filecontentsID && pformatetc->tymed == TYMED_ISTREAM) |
| 300 | return ResultFromScode(S_OK); |
| 301 | |
| 302 | return ResultFromScode(S_FALSE); |
| 303 | } |
| 304 | |
| 305 | STDMETHODIMP CDataObject::GetCanonicalFormatEtc(LPFORMATETC /*pformatetc*/, LPFORMATETC pformatetcOut) { |
| 306 | pformatetcOut->ptd = NULL; |