IDataObject::EnumFormatEtc Called by the shell to enumerate the formats we support. @param dwDirection Whether to return formats supported for setting or for getting. @param ppenumFormatEtc Pointer to location where to store an IEnumFORMATETC implementation that will provide all formats we support. @return S_OK if successful, otherwise an error code.
| 288 | // @return S_OK if successful, otherwise an error code. |
| 289 | // |
| 290 | [[gsl::suppress(c.128), gsl::suppress(f.6)]] |
| 291 | STDMETHODIMP CPathCopyCopyDataHandler::EnumFormatEtc( |
| 292 | DWORD dwDirection, |
| 293 | IEnumFORMATETC **ppenumFormatEtc) |
| 294 | { |
| 295 | // We save the supported formats in the registry, so |
| 296 | // we can use this simple API call to get the enumerator. |
| 297 | HRESULT hRes = E_INVALIDARG; |
| 298 | if (ppenumFormatEtc != nullptr) { |
| 299 | hRes = ::OleRegEnumFormatEtc(__uuidof(PathCopyCopyDataHandler), dwDirection, ppenumFormatEtc); |
| 300 | } |
| 301 | return hRes; |
| 302 | } |
| 303 | |
| 304 | // |
| 305 | // IDataObject::DAdvise |
nothing calls this directly
no outgoing calls
no test coverage detected