本文整理汇总了C++中ITsStrFactoryPtr::DeserializeStringRgch方法的典型用法代码示例。如果您正苦于以下问题:C++ ITsStrFactoryPtr::DeserializeStringRgch方法的具体用法?C++ ITsStrFactoryPtr::DeserializeStringRgch怎么用?C++ ITsStrFactoryPtr::DeserializeStringRgch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITsStrFactoryPtr
的用法示例。
在下文中一共展示了ITsStrFactoryPtr::DeserializeStringRgch方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
//.........这里部分代码省略.........
case koctString:
case koctMlsAlt:
case koctMltAlt:
// Next column must give format; both are for the same property
ReadUnicode(hstmt, icol + 1, rgchData, kcchMaxData,
vchData, prgchData, cchData);
if (koctMltAlt != prgocs[icol].m_oct)
{
Assert(icol < cocs - 1 && prgocs[icol + 1].m_oct == koctFmt);
Assert(prgocs[icol].m_tag == prgocs[icol + 1].m_tag);
// Leave the data in prgchData and cchData, to be processed next iteration
// when we read the format.
break;
}
// A MS alt without a FMT column, use the specified writing system both for the string
// formatting and to indicate the alternative.
CheckHr(qtsf->MakeStringRgch(prgchData, cchData, prgocs[icol].m_ws, &qtssVal));
CacheStringAlt(hvoCurBase, prgocs[icol].m_tag,
prgocs[icol].m_ws, qtssVal);
break;
case koctFmt:
// Previous column must be string or multistring; we have already checked same tag.
Assert(icol > 0 &&
(prgocs[icol - 1].m_oct == koctString || prgocs[icol - 1].m_oct == koctMlsAlt));
ReadBinary(hstmt, icol + 1, rgbData, kcbMaxData,
vbData, prgbData, cbData);
int cbDataInt;
cbDataInt = cbData;
int cchDataInt;
cchDataInt = cchData;
if (cchDataInt == 0 && cbDataInt == 0)
CheckHr(qtsf->MakeStringRgch(NULL, 0, prgocs[icol - 1].m_ws, &qtssVal));
else
CheckHr(qtsf->DeserializeStringRgch(prgchData, &cchDataInt, prgbData,
&cbDataInt, &qtssVal));
if (prgocs[icol - 1].m_oct == koctString)
{
CacheStringProp(hvoCurBase, prgocs[icol].m_tag, qtssVal);
}
else
{
CacheStringAlt(hvoCurBase, prgocs[icol].m_tag,
prgocs[icol - 1].m_ws, qtssVal);
}
break;
case koctObj:
case koctBaseId:
long nIndicator;
CheckSqlRc(SQLGetData(hstmt, (unsigned short)(icol + 1), SQL_C_SLONG,
&hvoVal, 4, &nIndicator));
// Treat null as zero.
if (nIndicator == SQL_NULL_DATA)
hvoVal = 0;
if (prgocs[icol].m_oct == koctObj)
CacheObjProp(hvoCurBase, prgocs[icol].m_tag, hvoVal);
rghvoBaseIds[icol] = hvoVal;
break;
case koctObjVec:
CheckSqlRc(SQLGetData(hstmt, (unsigned short)(icol + 1), SQL_C_SLONG,
&hvoVal, 4, NULL));
rghvoBaseIds[icol] = hvoVal;
// See if there has been a change in the base column, if so, record value and
// start a new one.
if (icolVec < 0)
{
// First iteration, ignore previous object