MCPcopy Create free account
hub / github.com/derceg/explorerplusplus / GetData

Method GetData

Explorer++/Helper/iDataObject.cpp:132–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132HRESULT __stdcall DataObject::GetData(FORMATETC *pFormatEtc,STGMEDIUM *pMedium)
133{
134 if(pFormatEtc == NULL || pMedium == NULL)
135 {
136 return E_INVALIDARG;
137 }
138
139 if(QueryGetData(pFormatEtc) == DV_E_FORMATETC)
140 {
141 return DV_E_FORMATETC;
142 }
143
144 for(const auto &dao : m_daoList)
145 {
146 if(dao.fe.cfFormat == pFormatEtc->cfFormat &&
147 dao.fe.tymed & pFormatEtc->tymed &&
148 dao.fe.dwAspect == pFormatEtc->dwAspect)
149 {
150 BOOL bRet = DuplicateStorageMedium(pMedium,&dao.stg,&dao.fe);
151
152 if(!bRet)
153 {
154 return STG_E_MEDIUMFULL;
155 }
156
157 return S_OK;
158 }
159 }
160
161 return DV_E_FORMATETC;
162}
163
164BOOL DataObject::DuplicateStorageMedium(STGMEDIUM *pstgDest, const STGMEDIUM *pstgSrc, const FORMATETC *pftc)
165{

Callers 15

DropMethod · 0.80
CheckItemLocationsMethod · 0.80
CheckItemLocationsMethod · 0.80
DropMethod · 0.80
ExtractDroppedFilesListFunction · 0.80
HandleLeftClickDropMethod · 0.80
CopyHDropDataMethod · 0.80
CopyShellIDListDataMethod · 0.80

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.64