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 (
CString(LPCTSTR)转为VARTYPE类型
最新推荐文章于 2024-09-21 10:52:49 发布
该代码段展示了如何从LPCTSTR类型的字符串中解析并转换成VARTYPE类型。通过比较输入的类型字符串与预定义的VARTYPE类型字符串,如'Boolean', 'Byte', 'Float'等,返回对应的VARTYPE枚举值。如果找不到匹配的类型,则返回VT_EMPTY。"
129665192,9999484,Docker容器部署详解,"['容器技术', 'Docker部署', '运维', '镜像', '系统进程']
摘要由CSDN通过智能技术生成