Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The wchar_t keyword designates a wide-character type.
wchar_t identifier-name;
identifier-name
Specifies a valid MIDL identifier. Valid MIDL identifiers consist of up to 31 alphanumeric and/or underscore characters and must start with an alphabetic or underscore character.
The wchar_t type is a 16-bit integer which represents a UTF-16 code unit.
The underlying type of wchar_t is determined by the C or C++ compiler. For C++, you can choose the underlying type with the /Zc:wchar_t compiler option.
The MIDL compiler allows redefinition of wchar_t, but only if it is defined as an unsigned short. If you do redefine wchar_t in this way, then you must use the /Zc:wchar_t- compiler option when compiling as C++ to avoid a C++ type redefinition conflict for wchar_t. Redefining wchar_t is supported only for compatibility reasons and is not recommended.
The wide-character type is one of the predefined types of MIDL. The wide-character type can appear as a type specifier in const declarations, typedef declarations, general declarations, and function declarators (as a function return type specifier and as a parameter-type specifier). For the context in which type specifiers appear, see Interface Definition (IDL) File.
The [string] attribute can be applied to a pointer or array of type wchar_t.
Use the L character before a character or a string constant to designate the wide character type constant.
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!