VirtualBox

Changeset 58177 in vbox


Ignore:
Timestamp:
Oct 12, 2015 11:19:10 AM (9 years ago)
Author:
vboxsync
Message:

iprt/cdefs.h,VBoxGuestR3LibAdditions.cpp: Added RT_LSTR for prefixing defined string constants with 'L'.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cdefs.h

    r57944 r58177  
    14171417/** @def RT_XSTR
    14181418 * Returns the expanded argument as a string.
    1419  * @param   str     Argument to expand and stringy. */
     1419 * @param   str     Argument to expand and stringify. */
    14201420#define RT_XSTR(str)            RT_STR(str)
     1421
     1422/** @def RT_LSTR_2
     1423 * Helper for RT_WSTR that gets the expanded @a str.
     1424 * @param   str     String litteral to prefix with 'L'.  */
     1425#define RT_LSTR_2(str)          L##str
     1426/** @def RT_LSTR
     1427 * Returns the expanded argument with a L string prefix.
     1428 *
     1429 * Intended for converting ASCII string \#defines into wide char string
     1430 * litterals on Windows.
     1431 *
     1432 * @param   str     String litteral to . */
     1433#define RT_LSTR(str)            RT_LSTR_2(str)
    14211434
    14221435/** @def RT_CONCAT
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibAdditions.cpp

    r58176 r58177  
    4040#ifdef RT_OS_WINDOWS
    4141
    42 # define WIDE_STR_2(a) L##a
    43 # define WIDE_STR(a) WIDE_STR_2(a)
    44 
    4542/**
    4643 * Opens the "VirtualBox Guest Additions" registry key.
     
    5855    static PCRTUTF16 s_apwszKeys[] =
    5956    {
    60         L"SOFTWARE\\" WIDE_STR(VBOX_VENDOR_SHORT) L"\\VirtualBox Guest Additions",
     57        L"SOFTWARE\\" RT_LSTR(VBOX_VENDOR_SHORT) L"\\VirtualBox Guest Additions",
    6158#ifdef RT_ARCH_AMD64
    62         L"SOFTWARE\\Wow6432Node\\" WIDE_STR(VBOX_VENDOR_SHORT) L"\\VirtualBox Guest Additions",
     59        L"SOFTWARE\\Wow6432Node\\" RT_LSTR(VBOX_VENDOR_SHORT) L"\\VirtualBox Guest Additions",
    6360#endif
    6461        L"SOFTWARE\\Sun\\VirtualBox Guest Additions",
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette