RPC_WSTR
The data type RPC_WSTR represents a platform-specific wide character string.
#if defined(RPC_USE_NATIVE_WCHAR) && defined(_NATIVE_WCHAR_T_DEFINED)
typedef _Null_terminated_ wchar_t __RPC_FAR * RPC_WSTR;
typedef _Null_terminated_ const wchar_t * RPC_CWSTR;
#else
typedef _Null_terminated_ unsigned short __RPC_FAR * RPC_WSTR;
typedef _Null_terminated_ const unsigned short * RPC_CWSTR;
#endif
By default, the RPC_WSTR type is a pointer to a null-terminated UTF-16 Unicode string represented as a sequence of unsigned short values, and the RPC_CWSTR type is a pointer to a non-modifiable string in the same format.
When compiling for C++ where wchar_t
is a native type
(by using the /Zc:wchar_t
compiler option),
you can define the preprocessor macro RPC_USE_NATIVE_WCHAR
to change the definitions of RPC_WSTR and RPC_CWSTR to use the native wchar_t
type
instead of unsigned short
.
Requirement | Value |
---|---|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
Minimum supported server |
Windows 2000 Server [desktop apps only] |
Header |
|