MCPcopy Create free account
hub / github.com/clechasseur/pathcopycopy / EnumFormatEtc

Method EnumFormatEtc

PathCopyCopy/src/PathCopyCopyDataHandler.cpp:290–302  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

288// @return S_OK if successful, otherwise an error code.
289//
290[[gsl::suppress(c.128), gsl::suppress(f.6)]]
291STDMETHODIMP 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected