ntstrsafe.h 标头

如果使用安全字符串函数而不是 C 语言运行时库提供的字符串操作函数,则可以保护代码免受可能使代码不可信的缓冲区溢出错误的影响。 此标头声明了复制、连接和格式化字符串的函数,从而防止出现缓冲区溢出错误。

若要操作 Unicode 和 ANSI 字符串,每个函数提供两个版本:

  • 支持双字节 Unicode 字符的 W 后缀版本。
  • 支持单字节 ANSI 字符的 A 后缀版本。

Unicode 字符串在内核模式驱动程序 UNICODE_STRING 结构内指定。

有关详细信息,请参阅:

ntstrsafe.h 包含以下编程接口:

函数

 
RtlStringCbCatA

RtlStringCbCatW 和 RtlStringCbCatA 函数连接两个字节计数的字符串。
RtlStringCbCatExA

RtlStringCbCatExW 和 RtlStringCbCatExA 函数连接两个字节计数的字符串。
RtlStringCbCatExW

了解 RtlStringCbCatExW 和 RtlStringCbCatExA 函数如何连接两个字节计数的字符串。
RtlStringCbCatNA

RtlStringCbCatNW 和 RtlStringCbCatNA 函数连接两个字节计数字符串,同时限制追加字符串的大小。
RtlStringCbCatNExA

RtlStringCbCatNExW 和 RtlStringCbCatNExA 函数连接两个字节计数字符串,同时限制追加字符串的大小。
RtlStringCbCatNExW

了解 RtlStringCbCatNExW 和 RtlStringCbCatNExA 函数如何连接两个字节计数字符串,同时限制追加字符串的大小。
RtlStringCbCatNW

了解 RtlStringCbCatNW 和 RtlStringCbCatNA 函数如何连接两个字节计数字符串,同时限制追加字符串的大小。
RtlStringCbCatW

了解 RtlStringCbCatW 和 RtlStringCbCatA 函数如何连接两个字节计数的字符串。
RtlStringCbCopyA

RtlStringCbCopyW 和 RtlStringCbCopyA 函数将字节计数的字符串复制到缓冲区中。
RtlStringCbCopyExA

RtlStringCbCopyExW 和 RtlStringCbCopyExA 函数将字节计数的字符串复制到缓冲区中。
RtlStringCbCopyExW

了解 RtlStringCbCopyExW 和 RtlStringCbCopyExA 函数如何将字节计数的字符串复制到缓冲区中。
RtlStringCbCopyNA

RtlStringCbCopyNW 和 RtlStringCbCopyNA 函数将字节计数的字符串复制到缓冲区,同时限制复制的字符串的大小。
RtlStringCbCopyNExA

RtlStringCbCopyNExW 和 RtlStringCbCopyNExA 函数将字节计数字符串复制到缓冲区,同时限制复制的字符串的大小。
RtlStringCbCopyNExW

了解 RtlStringCbCopyNExW 和 RtlStringCbCopyNExA 函数如何将字节计数字符串复制到缓冲区,同时限制复制的字符串的大小。
RtlStringCbCopyNW

了解 RtlStringCbCopyNW 和 RtlStringCbCopyNA 函数如何将字节计数字符串复制到缓冲区,同时限制复制的字符串的大小。
RtlStringCbCopyUnicodeString

RtlStringCbCopyUnicodeString 函数将UNICODE_STRING结构的内容复制到指定的目标。
RtlStringCbCopyUnicodeStringEx

RtlStringCbCopyUnicodeStringEx 函数将UNICODE_STRING结构的内容复制到指定的目标。
RtlStringCbCopyW

了解 RtlStringCbCopyW 和 RtlStringCbCopyA 函数如何将字节计数的字符串复制到缓冲区中。
RtlStringCbLengthA

RtlStringCbLengthW 和 RtlStringCbLengthA 函数确定提供的字符串的长度(以字节为单位)。
RtlStringCbLengthW

了解 RtlStringCbLengthW 和 RtlStringCbLengthA 函数如何确定提供的字符串的长度(以字节为单位)。
RtlStringCbPrintfA

RtlStringCbPrintfW 和 RtlStringCbPrintfA 函数创建字节计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCbPrintfExA

RtlStringCbPrintfExW 和 RtlStringCbPrintfExA 函数创建字节计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCbPrintfExW

了解 RtlStringCbPrintfExW 和 RtlStringCbPrintfExA 函数如何创建字节计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCbPrintfW

了解 RtlStringCbPrintfW 和 RtlStringCbPrintfA 函数如何创建字节计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCbVPrintfA

RtlStringCbVPrintfW 和 RtlStringCbVPrintfA 函数使用基于提供的格式设置信息创建字节计数的文本字符串。
RtlStringCbVPrintfExA

RtlStringCbVPrintfExW 和 RtlStringCbVPrintfExA 函数创建字节计数的文本字符串,其格式基于提供的格式设置信息。
RtlStringCbVPrintfExW

了解 RtlStringCbVPrintfExW 和 RtlStringCbVPrintfExA 函数如何创建字节计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCbVPrintfW

了解 RtlStringCbVPrintfW 和 RtlStringCbVPrintfA 函数如何创建字节计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCchCatA

RtlStringCchCatW 和 RtlStringCchCatA 函数连接两个字符计数的字符串。
RtlStringCchCatExA

RtlStringCchCatExW 和 RtlStringCchCatExA 函数连接两个字符计数的字符串。
RtlStringCchCatExW

了解 RtlStringCchCatExW 和 RtlStringCchCatExA 函数如何连接两个字符计数的字符串。
RtlStringCchCatNA

RtlStringCchCatNW 和 RtlStringCchCatNA 函数连接两个字符计数字符串,同时限制追加字符串的大小。
RtlStringCchCatNExA

RtlStringCchCatNExW 和 RtlStringCchCatNExA 函数连接两个字符计数字符串,同时限制追加字符串的大小。
RtlStringCchCatNExW

了解 RtlStringCchCatNExW 和 RtlStringCchCatNExA 函数如何连接两个字符计数字符串,同时限制追加字符串的大小。
RtlStringCchCatNW

了解 RtlStringCchCatNW 和 RtlStringCchCatNA 函数如何连接两个字符计数字符串,同时限制追加字符串的大小。
RtlStringCchCatW

了解 RtlStringCchCatW 和 RtlStringCchCatA 函数如何连接两个字符计数的字符串。
RtlStringCchCopyA

RtlStringCchCopyW 和 RtlStringCchCopyA 函数将以 null 结尾的源字符串复制到指定长度的目标缓冲区中。
RtlStringCchCopyExA

RtlStringCchCopyExW 和 RtlStringCchCopyExA 函数将字符计数的字符串复制到缓冲区中。
RtlStringCchCopyExW

了解 RtlStringCchCopyExW 和 RtlStringCchCopyExA 函数如何将字符计数的字符串复制到缓冲区中。
RtlStringCchCopyNA

RtlStringCchCopyNW 和 RtlStringCchCopyNA 函数将字符计数字符串复制到缓冲区,同时限制复制的字符串的大小。
RtlStringCchCopyNExA

RtlStringCchCopyNExW 和 RtlStringCchCopyNExA 函数将字符计数字符串复制到缓冲区,同时限制复制的字符串的大小。
RtlStringCchCopyNExW

了解 RtlStringCchCopyNExW 和 RtlStringCchCopyNExA 函数如何将字符计数字符串复制到缓冲区,同时限制复制的字符串的大小。
RtlStringCchCopyNW

了解 RtlStringCchCopyNW 和 RtlStringCchCopyNA 函数如何将字符计数字符串复制到缓冲区,同时限制复制的字符串的大小。
RtlStringCchCopyUnicodeString

RtlStringCchCopyUnicodeString 函数将UNICODE_STRING结构的内容复制到指定的目标。
RtlStringCchCopyUnicodeStringEx

RtlStringCchCopyUnicodeStringEx 函数将UNICODE_STRING结构的内容复制到指定的目标。
RtlStringCchCopyW

了解 RtlStringCchCopyW 和 RtlStringCchCopyA 函数如何将以 null 结尾的源字符串复制到指定长度的目标缓冲区中。
RtlStringCchLengthA

RtlStringCchLengthW 和 RtlStringCchLengthA 函数确定提供的字符串的长度(以字符为单位)。
RtlStringCchLengthW

了解 RtlStringCchLengthW 和 RtlStringCchLengthA 函数如何确定提供的字符串的长度(以字符为单位)。
RtlStringCchPrintfA

RtlStringCchPrintfW 和 RtlStringCchPrintfA 函数创建字符计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCchPrintfExA

RtlStringCchPrintfExW 和 RtlStringCchPrintfExA 函数创建字符计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCchPrintfExW

了解 RtlStringCchPrintfExW 和 RtlStringCchPrintfExA 函数如何创建字符计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCchPrintfW

了解 RtlStringCchPrintfW 和 RtlStringCchPrintfA 函数如何创建字符计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCchVPrintfA

RtlStringCchVPrintfW 和 RtlStringCchVPrintfA 函数创建字符计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCchVPrintfExA

RtlStringCchVPrintfExW 和 RtlStringCchVPrintfExA 函数创建字符计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCchVPrintfExW

了解 RtlStringCchVPrintfExW 和 RtlStringCchVPrintfExA 函数如何创建字符计数文本字符串,其格式基于提供的格式设置信息。
RtlStringCchVPrintfW

了解 RtlStringCchVPrintfW 和 RtlStringCchVPrintfA 函数如何创建字符计数文本字符串,其格式基于提供的格式设置信息。
RtlUnalignedStringCbLengthW

RtlUnalignedStringCbLengthW 函数是 RtlStringCbLength 函数的一个版本,它接受指向 Unicode 字符字符串的未对齐指针。
RtlUnalignedStringCchLengthW

RtlUnalignedStringCchLengthW 函数是 RtlStringCchLength 函数的一个版本,它接受指向 Unicode 字符字符串的未对齐指针。
RtlUnicodeStringCat

RtlUnicodeStringCat 函数将包含在UNICODE_STRING结构中的两个字符串连接在一起。
RtlUnicodeStringCatEx

RtlUnicodeStringCatEx 函数将包含在UNICODE_STRING结构中的两个字符串连接在一起。
RtlUnicodeStringCatString

当目标字符串包含在UNICODE_STRING结构中时,RtlUnicodeStringCatString 函数连接两个字符串。
RtlUnicodeStringCatStringEx

当目标字符串包含在UNICODE_STRING结构中时,RtlUnicodeStringCatStringEx 函数连接两个字符串。
RtlUnicodeStringCbCatN

RtlUnicodeStringCbCatN 函数连接两个包含在UNICODE_STRING结构中的字符串,同时限制复制的字符串的大小。
RtlUnicodeStringCbCatNEx

RtlUnicodeStringCbCatNEx 函数连接UNICODE_STRING结构中包含的两个字符串,同时限制复制的字符串的大小。
RtlUnicodeStringCbCatStringN

当目标字符串包含在UNICODE_STRING结构中时,RtlUnicodeStringCbCatStringN 函数连接两个字符串,同时限制追加的字符串的大小。
RtlUnicodeStringCbCatStringNEx

当目标字符串包含在UNICODE_STRING结构中时,RtlUnicodeStringCbCatStringNEx 函数连接两个字符串,同时限制追加的字符串的大小。
RtlUnicodeStringCbCopyN

RtlUnicodeStringCbCopyN 函数将字符串从一个UNICODE_STRING结构复制到另一个结构,同时限制复制的字符串的大小。
RtlUnicodeStringCbCopyNEx

RtlUnicodeStringCbCopyNEx 函数将字符串从一个UNICODE_STRING结构复制到另一个结构,同时限制复制的字符串的大小。
RtlUnicodeStringCbCopyStringN

RtlUnicodeStringCbCopyStringN 函数将字符串复制到UNICODE_STRING结构中,同时限制复制的字符串的大小。
RtlUnicodeStringCbCopyStringNEx

RtlUnicodeStringCbCopyStringNEx 函数将字符串复制到UNICODE_STRING结构中,同时限制复制的字符串的大小。
RtlUnicodeStringCchCatN

RtlUnicodeStringCchCatN 函数连接两个包含在UNICODE_STRING结构中的字符串,同时限制复制的字符串的大小。
RtlUnicodeStringCchCatNEx

RtlUnicodeStringCchCatNEx 函数连接UNICODE_STRING结构中包含的两个字符串,同时限制复制的字符串的大小。
RtlUnicodeStringCchCatStringN

当目标字符串包含在UNICODE_STRING结构中时,RtlUnicodeStringCchCatStringN 函数连接两个字符串,同时限制追加字符串的大小。
RtlUnicodeStringCchCatStringNEx

当目标字符串包含在UNICODE_STRING结构中时,RtlUnicodeStringCchCatStringNEx 函数连接两个字符串,同时限制追加的字符串的大小。
RtlUnicodeStringCchCopyN

RtlUnicodeStringCchCopyN 函数将字符串从一个UNICODE_STRING结构复制到另一个结构,同时限制复制的字符串的大小。
RtlUnicodeStringCchCopyNEx

RtlUnicodeStringCchCopyNEx 函数将字符串从一个UNICODE_STRING结构复制到另一个结构,同时限制复制的字符串的大小。
RtlUnicodeStringCchCopyStringN

RtlUnicodeStringCchCopyStringN 函数将字符串复制到UNICODE_STRING结构中,同时限制复制的字符串的大小。
RtlUnicodeStringCchCopyStringNEx

RtlUnicodeStringCchCopyStringNEx 函数将字符串复制到UNICODE_STRING结构中,同时限制复制的字符串的大小。
RtlUnicodeStringCopy

RtlUnicodeStringCopy 函数将字符串从一个UNICODE_STRING结构复制到另一个结构。
RtlUnicodeStringCopyEx

RtlUnicodeStringCopyEx 函数将字符串从一个UNICODE_STRING结构复制到另一个结构。
RtlUnicodeStringCopyString

RtlUnicodeStringCopyString 函数将字符串复制到UNICODE_STRING结构中。
RtlUnicodeStringCopyStringEx

RtlUnicodeStringCopyStringEx 函数将字符串复制到UNICODE_STRING结构中。
RtlUnicodeStringInit

RtlUnicodeStringInit 函数初始化UNICODE_STRING结构。
RtlUnicodeStringInitEx

RtlUnicodeStringInitEx 函数初始化UNICODE_STRING结构。
RtlUnicodeStringPrintf

RtlUnicodeStringPrintf 函数创建一个文本字符串,其格式基于提供的格式设置信息,并将该字符串存储在UNICODE_STRING结构中。
RtlUnicodeStringPrintfEx

RtlUnicodeStringPrintfEx 函数使用基于提供的格式设置信息的格式创建文本字符串,并将字符串存储在UNICODE_STRING结构中。
RtlUnicodeStringValidate

RtlUnicodeStringValidate 函数验证UNICODE_STRING结构的内容。
RtlUnicodeStringValidateEx

RtlUnicodeStringValidateEx 函数验证UNICODE_STRING结构的内容。
RtlUnicodeStringVPrintf

RtlUnicodeStringVPrintf 函数创建一个文本字符串,其格式基于提供的格式设置信息,并将字符串存储在UNICODE_STRING结构中。
RtlUnicodeStringVPrintfEx

RtlUnicodeStringVPrintfEx 函数使用基于提供的格式设置信息的格式创建文本字符串,并将字符串存储在UNICODE_STRING结构中。