开发者

How to get the length of a _bstr_t

开发者 https://www.devze.com 2023-03-08 21:07 出处:网络
I am copying a wstring to a _bstr_t using: _bstr_t name; SysFreeString(name);// Free previous string, if any.

I am copying a wstring to a _bstr_t using:

_bstr_t name;           
SysFreeString(name);   // Free previous string, if any.
name = SysAllocString(Member[k].Membername);

Now before I use "name" I want to check if it contains at least 5 characters. In other words, I want to check the length of it.

I didn't find a "countof" or "len" or something like that. Has anyone开发者_StackOverflow中文版 a idea?

Thanks, Lumpi


name.length()

http://msdn.microsoft.com/en-us/library/zthfhkd6%28v=VS.100%29.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消