本文整理汇总了C++中ListItem::GetContent方法的典型用法代码示例。如果您正苦于以下问题:C++ ListItem::GetContent方法的具体用法?C++ ListItem::GetContent怎么用?C++ ListItem::GetContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListItem
的用法示例。
在下文中一共展示了ListItem::GetContent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckEvent
STDMETHODIMP OrxEvent::CheckEvent(LPCOLESTR Code, IDispatch **pbIDispatch)
{
ListItem *Current;
ESource *Content;
HRESULT RetCode=DISP_E_UNKNOWNNAME;
int i=0;
size_t CodeLen;
RetCode = DISP_E_UNKNOWNNAME;
if (!Code)
{
RetCode = E_POINTER;
}
else
{
CodeLen = wcslen(Code);
}
if (!pbIDispatch)
{
RetCode = E_POINTER;
}
else
{
*pbIDispatch = (IDispatch *)NULL;
}
if (RetCode == DISP_E_UNKNOWNNAME)
{
while (Current = EventSourceChain->FindItem(i++))
{
Content = (ESource *)Current->GetContent();
if (Content->EventType == ESource::ParseProcedure)
{
if (CodeLen == Content->CodeLen)
{
if (Content->Code)
{
if (wcsicmp(Code,Content->Code) == 0)
{
*pbIDispatch = (IDispatch *)Content;
RetCode = S_OK;
((IDispatch*) Content)->AddRef();
break;
}
}
}
}
}
}
FPRINTF2(logfile,"OrxEvent::CheckEvent() HRESULT %08x. \n",RetCode);
return RetCode;
}
示例2: DisconnectEvents
OrxEvent::~OrxEvent()
{
ListItem *Current;
ESource *Content;
FPRINTF2(logfile,"OrxEvent::~OrxEvent() -- i.e., the destructor. \n");
DisconnectEvents();
Current = EventSourceChain->FindItem(0);
while (Current)
{
Content = (ESource *)Current->GetContent();
if (Content->EventType == ESource::AddScriptlet)
{
Content->Release();
}
Current = EventSourceChain->FindItem();
}
delete EventSourceChain;
FPRINTF2(logfile,"OrxEvent::~OrxEvent() completed. \n");
}
示例3: FindDispID
/******************************************************************************
*
* FindDispID
*
******************************************************************************/
STDMETHODIMP OrxDispID::FindDispID(OLECHAR *pName, DISPID *pbDispID)
{
ListItem *CurrItem;
PDID CurrDID;
int DispID;
*pbDispID = (DISPID)0;
CurrItem = Chain.FindItem(0);
while (CurrItem)
{
CurrDID = (PDID)CurrItem->GetContent();
if (CurrDID->Name != NULL) if (wcsicmp(pName,CurrDID->Name) == 0)
{
sscanf(CurrItem->GetName(),"%d",&DispID);
*pbDispID = (DISPID)DispID;
FPRINTF2(CurrentObj_logfile,"OrxDisp::FindDispID() Found %S, DispID %d\n",pName,DispID);
return S_OK;
}
CurrItem = Chain.FindItem();
}
return DISP_E_UNKNOWNNAME;
}