Export (0) Print
Expand All

Safe String Functions for Unicode and ANSI Characters

Use the functions in this section to manipulate Unicode and ANSI strings in kernel-mode drivers.

Each function is available in two versions:

  • A W-suffixed version that supports two-byte Unicode characters.

  • An A-suffixed version that supports one-byte ANSI characters.

If you use the safe string functions instead of the string manipulation functions that are provided by C-language run-time libraries, you protect your code from buffer overrun errors that can make code untrustworthy. For more information, see Using Safe String Functions.

In this section

TopicDescription

RtlStringCbCat

The RtlStringCbCatW and RtlStringCbCatA functions concatenate two byte-counted strings.

RtlStringCbCatEx

The RtlStringCbCatExW and RtlStringCbCatExA functions concatenate two byte-counted strings.

RtlStringCbCatN

The RtlStringCbCatNW and RtlStringCbCatNA functions concatenate two byte-counted strings while limiting the size of the appended string.

RtlStringCbCatNEx

The RtlStringCbCatNExW and RtlStringCbCatNExA functions concatenate two byte-counted strings while limiting the size of the appended string.

RtlStringCbCopy

The RtlStringCbCopyW and RtlStringCbCopyA functions copy a byte-counted string into a buffer.

RtlStringCbCopyEx

The RtlStringCbCopyExW and RtlStringCbCopyExA functions copy a byte-counted string into a buffer.

RtlStringCbCopyN

The RtlStringCbCopyNW and RtlStringCbCopyNA functions copy a byte-counted string to a buffer while limiting the size of the copied string.

RtlStringCbCopyNEx

The RtlStringCbCopyNExW and RtlStringCbCopyNExA functions copy a byte-counted string to a buffer while limiting the size of the copied string.

RtlStringCbLength

The RtlStringCbLengthW and RtlStringCbLengthA functions determine the length, in bytes, of a supplied string.

RtlStringCbPrintf

The RtlStringCbPrintfW and RtlStringCbPrintfA functions create a byte-counted text string, with formatting that is based on supplied formatting information.

RtlStringCbPrintfEx

The RtlStringCbPrintfExW and RtlStringCbPrintfExA functions create a byte-counted text string, with formatting that is based on supplied formatting information.

RtlStringCbVPrintf

The RtlStringCbVPrintfW and RtlStringCbVPrintfA functions create a byte-counted text string, with formatting that is based on supplied formatting information.

RtlStringCbVPrintfEx

The RtlStringCbVPrintfExW and RtlStringCbVPrintfExA functions create a byte-counted text string, with formatting that is based on supplied formatting information.

RtlStringCchCat

The RtlStringCchCatW and RtlStringCchCatA functions concatenate two character-counted strings.

RtlStringCchCatEx

The RtlStringCchCatExW and RtlStringCchCatExA functions concatenate two character-counted strings.

RtlStringCchCatN

The RtlStringCchCatNW and RtlStringCchCatNA functions concatenate two character-counted strings while limiting the size of the appended string.

RtlStringCchCatNEx

The RtlStringCchCatNExW and RtlStringCchCatNExA functions concatenate two character-counted strings while limiting the size of the appended string.

RtlStringCchCopy

The RtlStringCchCopyW and RtlStringCchCopyA functions copy a null-terminated source string into a destination buffer of specified length.

RtlStringCchCopyEx

The RtlStringCchCopyExW and RtlStringCchCopyExA functions copy a character-counted string into a buffer.

RtlStringCchCopyN

The RtlStringCchCopyNW and RtlStringCchCopyNA functions copy a character-counted string to a buffer while limiting the size of the copied string.

RtlStringCchCopyNEx

The RtlStringCchCopyNExW and RtlStringCchCopyNExA functions copy a character-counted string to a buffer while limiting the size of the copied string.

RtlStringCchLength

The RtlStringCchLengthW and RtlStringCchLengthA functions determine the length, in characters, of a supplied string.

RtlStringCchPrintf

The RtlStringCchPrintfW and RtlStringCchPrintfA functions create a character-counted text string, with formatting that is based on supplied formatting information.

RtlStringCchPrintfEx

The RtlStringCchPrintfExW and RtlStringCchPrintfExA functions create a character-counted text string, with formatting that is based on supplied formatting information.

RtlStringCchVPrintf

The RtlStringCchVPrintfW and RtlStringCchVPrintfA functions create a character-counted text string, with formatting that is based on supplied formatting information.

RtlStringCchVPrintfEx

The RtlStringCchVPrintfExW and RtlStringCchVPrintfExA functions create a character-counted text string, with formatting that is based on supplied formatting information.

RtlUnalignedStringCbLength

The RtlUnalignedStringCbLengthW function is a version of the RtlStringCbLength function that accepts an unaligned pointer to a string of Unicode characters.

RtlUnalignedStringCchLength

The RtlUnalignedStringCchLengthW function is a version of the RtlStringCchLength function that accepts an unaligned pointer to a string of Unicode characters.

 

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft