WindowsGetStringLen 函数 (winstring.h)

获取指定字符串的长度(以 Unicode 字符为单位)。

Syntax

UINT32 WindowsGetStringLen(
  HSTRING string
);

参数

string

类型:[in] HSTRING

要找到其长度的字符串。

返回值

类型:UINT32

字符串中的 Unicode 字符数,包括嵌入的 null 字符,但不包括终止 null;如果字符串NULL,则为 0。

要求

Requirement 价值
最低支持的客户端 Windows 8 [桌面应用 |UWP 应用]
支持的最低服务器 Windows Server 2012 [桌面应用 |UWP 应用]
目标平台 Windows操作系统
Header winstring.h
Library mincore.lib