WindowsStringHasEmbeddedNull 函数 (winstring.h)

指示指定的字符串是否嵌入了 null 字符。

Syntax

HRESULT WindowsStringHasEmbeddedNull(
  HSTRING string,
  BOOL    *hasEmbedNull
);

参数

string

类型:[in] HSTRING

要测试嵌入的 null 字符的字符串。

hasEmbedNull

类型:[out] BOOL*

如果字符串具有一个或多个嵌入的 null 字符,则为 TRUE;否则为 FALSE。 如果字符串NULL 或空字符串,则为 FALSE

返回值

类型:HRESULT

此函数可以返回其中一个值。

返回代码 Description
S_OK
测试成功完成。
E_INVALIDARG
hasEmbedNullNULL

要求

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