大网数据广告活动
网络与域名解析

RPC_WSTR (Rpcdce.h)

· 52CE 我爱测

The data type RPC_WSTR represents a platform-specific wide character string.

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

Remarks

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.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header Rpcdce.h (include Rpc.h)

See also

RPC_OBJECT_INQ_FN

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 06/10/2023
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。