日期:2014-05-20 浏览次数:20982 次
HRESULT CWAB::DeleteEntry() { HRESULT hr = hrSuccess; ULONG cbWABEID = 0; LPENTRYID lpWABEID = NULL; LPABCONT lpWABCont = NULL; ULONG ulObjType; SBinaryArray SBA; hr = m_lpAdrBook->GetPAB( &cbWABEID, &lpWABEID); if(HR_FAILED(hr)) goto out; hr = m_lpAdrBook->OpenEntry(cbWABEID, lpWABEID, NULL, 0, &ulObjType, (LPUNKNOWN *)&lpWABCont); if(HR_FAILED(hr)) goto out; SBA.cValues = 1; SBA.lpbin = &m_SB; hr = lpWABCont->DeleteEntries((LPENTRYLIST) &SBA, 0); if(m_lpPropArray) m_lpWABObject->FreeBuffer(m_lpPropArray); m_lpPropArray = NULL; m_ulcValues = 0; out: if(lpWABCont) lpWABCont->Release(); if(lpWABEID) m_lpWABObject->FreeBuffer(lpWABEID); return hr; }