MCPcopy Create free account
hub / github.com/alamaison/swish / ProdInnerWithFormat

Method ProdInnerWithFormat

swish/shell_folder/DataObject.cpp:259–272  ·  view source on GitHub ↗

* Prod the inner DataObject with the given format. * * This sets an empty item in the inner DataObject which causes it to register * the existence of the format. This ensures that calls to QueryGetData() and * the IEnumFORMATETC enumeration---both of which are delegated to the inner * object---respond correctly. */

Source from the content-addressed store, hash-verified

257 * object---respond correctly.
258 */
259HRESULT CDataObject::ProdInnerWithFormat(CLIPFORMAT nFormat, DWORD tymed)
260throw()
261{
262 CFormatEtc fetc(nFormat, tymed);
263
264 STGMEDIUM stgEmpty = STGMEDIUM();
265
266 // The tymeds in the FORMATETC and STGMEDIUM must match. This was tripping
267 // up Windows 8 (Consumer Preview) which is stricter about this and was
268 // returning E_OUTOFMEMORY from SetData.
269 stgEmpty.tymed = tymed;
270
271 return m_inner->SetData(&fetc, &stgEmpty, true);
272}

Callers

nothing calls this directly

Calls 1

SetDataMethod · 0.80

Tested by

no test coverage detected