字符串那些事儿:BSTR-LPSTR-LPWSTR-CString-VARIANT-COleVariant-_variant_t-CComBSTR-_bstr_t http://blog.csdn.net/pizi0475/archive/2010/03/04/5346708.aspx
这样应当是可以的。 char *pc1; char *pc2; pc1=new char[strText.GetLength()+1]; strcpy(pc1, strText); ... pc2=new char[strText.GetLength()+1]; strcpy(pc2, strText); ... SysAllocString(OLESTR(pc1)); SysAllocString(OLESTR(pc2));
char *pc1; char *pc2; pc1=new char[strText.GetLength()+1]; strcpy(pc1, strText); ... pc2=new char[strText.GetLength()+1]; strcpy(pc2, strText); ... SysAllocString(OLESTR(pc1)); SysAllocString(OLESTR(pc2));
还是报错。。。 error C2065: 'Lpc1' : undeclared identifier
65,186
社区成员
250,526
社区内容
加载中
试试用AI创作助手写篇文章吧