The Wxutil.h header file in the DirectShow base classes provides wide string functions, if they are not already provided by the Microsoft® Win32® environment.
Function | Description |
AMGetWideString | Allocates and creates a wide string version of an existing nonwide string. |
lstrcmpiW | Compares two wide strings, ignoring case. |
lstrcmpW | Compares two wide strings. |
lstrcpynW | Copies one wide string to another, with a maximum length. |
lstrcpyW | Copies one wide string to another. |
lstrlenW | Gets the length of a wide string in wide characters. |
Allocates and creates a Unicode version of an existing non-Unicode string.
STDAPI AMGetWideString(
LPCWSTR pszString,
LPWSTR *ppszReturn
);
Returns S_OK if successful, E_POINTER if ppszReturn is NULL, or E_OUTOFMEMORY if not enough memory is available.
Compares two wide-character strings. The comparison is not case sensitive.
int lstrcmpiW(
LPCWSTR lpszString1, /* address of first wide string */
LPCWSTR lpszString2
); /* address of second wide string */
Returns a negative value if the function succeeds and the string that lpszString1 points to is less than the string that lpszString2 points to. Returns a positive value if the string that lpszString1 points to is greater than the string that lpszString2 points to. Returns zero if the strings are equal.
The lstrcmpiW function compares two wide strings by checking the first characters against each other, the second characters against each other, and so on until it finds an inequality or reaches the ends of the strings.
The function returns the difference of the values of the first unequal characters it encounters. For instance, lstrcmpiW determines that L"abcz" is greater than L"abcdefg" and returns the difference of L'z' and L'd'.
The language (locale) is treated as always being English.
Compares two wide-character strings. The comparison is case sensitive.
int lstrcmpW(
LPCWSTR lpszString1, /* address of first wide string */
LPCWSTR lpszString2
); /* address of second wide string */
Returns a negative value if the function succeeds and the string that lpszString1 points to is less than the string that lpszString2 points to. Returns a positive value if the string that lpszString1 points to is greater than the string that lpszString2 points to. Returns zero if the strings are equal.
The lstrcmpW function compares two wide strings by checking the first characters against each other, the second characters against each other, and so on until it finds an inequality or reaches the ends of the strings.
The function returns the difference of the values of the first unequal characters it encounters. For instance, lstrcmpW determines that L"abcz" is greater than L"abcdefg" and returns the difference of L'z' and L'd'.
The language (locale) is treated as always being English.
Copies a wide string to a buffer.
LPWSTR lstrcpyW(
LPWSTR lpszString1, /* address of buffer */
LPCWSTR lpszString2
); /* address of wide string to copy */
Returns a pointer to the buffer.
Copies a wide string to a buffer, up to a specified number of wide characters.
LPWSTR lstrcpynW(
LPWSTR lpszString1, /* address of buffer */
LPCWSTR lpszString2, /* address of wide string to copy */
int iMaxLength
); /* max wide characters to copy */
Returns a pointer to the buffer.
If iMaxLength is nonzero, lstrcpynW always inserts a terminating null wide character in the destination string, which could result in the source string being truncated.
Retrieves the length of the specified wide string.
int lstrlenW(
LPCWSTR lpszString
); /* address of wide string to count */
If the function succeeds, the return value specifies the length of the string, in wide characters.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.