Retrieves a substring from the specified string. The substring starts at a specified character position and has a specified length.
HRESULT WindowsSubstringWithSpecifiedLength( HSTRING string, UINT32 startIndex, UINT32 length, HSTRING *newString );
The original string.
The zero-based starting character position of a substring in this instance.
The number of characters in the substring.
A string that is equivalent to the substring that begins at startIndex in string, or NULL if startIndex is equal to the length of string.
This function can return one of these values.
||The substring was created successfully.|
||newString is NULL, or startIndex plus length is greater than MAXUINT32, which is 4,294,967,295; that is, hexadecimal 0xFFFFFFFF.|
||startIndex is greater than the length of string, or startIndex plus length indicates a position not within string.|
||Failed to allocate the new substring.|
Each call to the WindowsSubstringWithSpecifiedLength function must be matched with a corresponding call to WindowsDeleteString.
|Minimum supported client||Windows 8 [desktop apps | UWP apps]|
|Minimum supported server||Windows Server 2012 [desktop apps | UWP apps]|