// -------------------------------------------------------------------------------------------- STDMETHODIMP CRegOperatPropAct::DoAction (IDataObject* pDataObj, DWORD) { WEnumLONG wEnumObj; HRESULT hr = GetEnumLONGData (pDataObj, (IEnum<LONG>**)(IEnumLONG**)wEnumObj.ppi()); if (FAILED(hr)) return hr; // Enumerator (an PropertyPage übergebene Objekte) in Liste speichern m_InObjs.push_back (wEnumObj); // Enumerator am Ende der Liste anfügen if (1 == m_InObjs.size()) m_ObjsIter = m_InObjs.begin(); // Iterator zeigt auf das 1. Element der Liste return hr; } // DoAction
STDMETHODIMP CTextSearchEngine::DoAction (IDataObject *pIDataObj, DWORD) { if (NULL == m_pCfgDlg) return E_UNEXPECTED; WEnumLONG EnumObj; HRESULT hr = GetEnumLONGData (pIDataObj, EnumObj.ppi()); if (S_OK == hr) { // JG 980916 für ProgInd vorbereiten m_pCfgDlg -> SetAction(this); hr = m_pCfgDlg -> SetEnumLONG (EnumObj); } return hr; }
STDMETHODIMP CSelectExportObjects::DoAction (IDataObject *pIDataObj, DWORD dwReserved) { // Eingabeobjekte einfach mit zu unserer Objektmenge hinzufügen if (NULL != pIDataObj) { // evtl. keine Eingabeobjektmenge gegeben COM_TRY { // aber nur Objekte der geforderten Datenquellen übernehmen WEnumLONG EnumObjs; OutEnumLONG iter_out (&m_Objects); if (S_OK == GetEnumLONGData (pIDataObj, __uuidof(IEnumLONG), EnumObjs.ppv())) { remove_copy_if (InEnumLONG(EnumObjs), InEnumLONG(), iter_out, CObjectToCopy(m_setDataSources)); } } COM_CATCH; }
// ---------------------------------------------------------------------------- // PropertySequence_func_RedoActions // ---------------------------------------------------------------------------- void PropertySequence_func_RedoActions (ebHTHREAD hThread, int iNumArgs, ebARGS lpArgs) { BASIC_OP_TRACE(PropertySequence_func_RedoActions); ebSetObject (lpArgs, 0, (DWORD)NULL); WPropertyActionSequence Seq ((IPropertyActionSequence *)ebGetObject (lpArgs, 1)); WDataObject InData, OutData; _DGeoObjects *pIObjs = iNumArgs > 1 ? (_DGeoObjects *)ebGetObject (lpArgs, 2) : NULL; HRESULT hr = NOERROR; if (NULL != pIObjs) { WEnumLONG EnumObjs; hr = GetEnumLongFromGeoObjects (pIObjs, EnumObjs.ppi()); if (SUCCEEDED(hr)) { hr = CoCreateInstance (CLSID_DataTransferObject, NULL, CLSCTX_INPROC_SERVER, IID_IDataObject, InData.ppv()); if (SUCCEEDED(hr)) hr = SetEnumLONGData (EnumObjs, InData); else InData.Assign (NULL); // freigeben } pIObjs = NULL; // wird nicht mehr benötigt } hr = Seq -> RedoActions (__hWndM, NULL, InData, OutData.ppi()); if (SUCCEEDED(hr)) { WEnumLONG EnumObjs; if (NULL != (IUnknown *)OutData) hr = GetEnumLONGData (OutData, EnumObjs.ppi()); if (SUCCEEDED(hr)) // jetzt Collection der GeoObjects generieren hr = GetGeoObjectsFromEnumlong (EnumObjs, &pIObjs); } if (SUCCEEDED(hr)) ebSetObject (lpArgs, 0, (DWORD)pIObjs); }