本文整理汇总了C++中StrAnsi::Equals方法的典型用法代码示例。如果您正苦于以下问题:C++ StrAnsi::Equals方法的具体用法?C++ StrAnsi::Equals怎么用?C++ StrAnsi::Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StrAnsi
的用法示例。
在下文中一共展示了StrAnsi::Equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckName
/*----------------------------------------------------------------------------------------------
This method checks for duplicates in list names. If the given name exists then return true.
@param pszName name to check to see if it exists.
@return True if name already exists.
----------------------------------------------------------------------------------------------*/
bool ListsPropDlg::CheckName(const achar * pszName)
{
AfMainWnd * pafw = MainWindow();
AssertPtr(pafw);
AfLpInfo * plpi = pafw->GetLpInfo();
AssertPtr(plpi);
Vector<HVO> & vhvo = plpi->GetPsslIds();
AfDbInfoPtr qdbi = plpi->GetDbInfo();
AssertPtr(qdbi);
IOleDbEncapPtr qode;
qdbi->GetDbAccess(&qode);
StrAnsi sta;
int i;
StrUni stuIds;
int cv = vhvo.Size();
Assert(cv);
ComBool fIsNull;
ComBool fMoreRows;
ULONG cbSpaceTaken;
IOleDbCommandPtr qodc;
const int kcchBuffer = MAX_PATH;
OLECHAR rgchName[kcchBuffer];
HVO hvo;
StrUni stu;
for (i = 0; i < cv; ++i)
{
hvo = vhvo[i];
stu.Format(L"exec GetOrderedMultiTxt '%d', %d",
hvo, kflidCmMajorObject_Name);
CheckHr(qode->CreateCommand(&qodc));
CheckHr(qodc->ExecCommand(stu.Bstr(), knSqlStmtStoredProcedure));
CheckHr(qodc->GetRowset(0));
CheckHr(qodc->NextRow(&fMoreRows));
Assert(fMoreRows); // This proc should always return something.
CheckHr(qodc->GetColValue(1, reinterpret_cast <BYTE *>(rgchName),
kcchBuffer * isizeof(OLECHAR), &cbSpaceTaken, &fIsNull, 2));
sta = rgchName;
if (hvo != m_hvoObj && sta.Equals(pszName))
return false;
}
return true;
}