From: Jacek Caban Subject: Re: [PATCH 7/7] widl: Fix C++ RuntimeClass string constant declaration. Message-Id: Date: Thu, 25 Feb 2021 14:21:33 +0100 In-Reply-To: <20210222090305.557337-7-rbernon@codeweavers.com> References: <20210222090305.557337-1-rbernon@codeweavers.com> <20210222090305.557337-7-rbernon@codeweavers.com> On 22.02.2021 10:03, RĂ©mi Bernon wrote: > fprintf(header, "#ifndef RUNTIMECLASS_%s_DEFINED\n", c_name); > fprintf(header, "#define RUNTIMECLASS_%s_DEFINED\n", c_name); > fprintf(header, "#if defined(_MSC_VER) || defined(__MINGW32__)\n"); > + fprintf(header, "#ifdef __cplusplus\n"); > + fprintf(header, "extern const DECLSPEC_SELECTANY wchar_t RuntimeClass_%s[] = L\"%s\";\n", c_name, name); > + fprintf(header, "#else\n"); I think we want to stick with WCHAR, otherwise you wouldn't be able to pass it to Windows APIs. Maybe you could check defined(WINE_UNICODE_NATIVE) and use u"" form like we do for __TEXT macro in winnt.rh. Thanks, Jacek