HString::Set 方法

将当前 HString 对象的值设置为指定的宽字符串或 HString 参数。

   HRESULT Set(
             const wchar_t* str) throw();
   HRESULT Set( 
             const wchar_t* str, 
             unsigned int len
              ) throw();
   HRESULT Set(
             const HSTRING& hstr
              ) throw();

参数

  • str
    宽字符字符串。

  • len
    分配给当前 HString 对象 str 参数的最大长度。

  • hstr
    一个现有的HString对象。

要求

**标头:**corewrappers.h

**命名空间:**Microsoft::WRL::Wrappers

请参见

参考

HString 类