VartypeFromString(LPCTSTR lpszType)
{
VARTYPE vtType;
// Compare input type string with supported types and return the
// corresponding variant type. (A match is found when lstrcmpi returns
// zero.) If specified type is not supported, then return VT_EMPTY.
// These strings must match those used below in StringFromVartype().
if (lstrcmpi (lpszType, _T("Boolean")) == 0)
vtType = VT_BOOL;
else if (lstrcmpi (lpszType, _T("Byte")) == 0)
vtType = VT_UI1;
else if (lstrcmpi (lpszType, _T("Byte Array")) == 0)
vtType = VT_UI1 | VT_ARRAY;
else if (lstrcmpi (lpszType, _T("Char")) == 0)
vtType = VT_I1;
else if (lstrc
CString(LPCTSTR)转为VARTYPE类型
最新推荐文章于 2025-08-07 21:29:52 发布