Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-18017

[CRYPTUI] MSVC compilation warning RC4206 : title string too long; truncated at 256

    XMLWordPrintable

Details

    Description

      0.4.15-dev-3723-g8d70159 the MSVC compiler complains about too long strings.

      [11181/12559] Building RC object dll\win32\cryptui\CMakeFiles\cryptui.dir\cryptui.rc.res
      dll\win32\cryptui\lang/cryptui_En.rc(289) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_En.rc(385) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Pl.rc(289) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Pl.rc(385) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_De.rc(289) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_De.rc(384) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Fr.rc(289) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Fr.rc(385) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_It.rc(289) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_It.rc(385) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Lt.rc(289) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Lt.rc(385) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Nl.rc(289) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Nl.rc(384) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Pt.rc(289) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Pt.rc(383) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Ro.rc(292) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Ro.rc(388) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Ru.rc(291) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Ru.rc(387) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Tr.rc(289) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Tr.rc(385) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Uk.rc(289) : warning RC4206 : title string too long; truncated at 256
      dll\win32\cryptui\lang/cryptui_Uk.rc(383) : warning RC4206 : title string too long; truncated at 256
      

      The strings it complains about are (for english line289 in IDD_IMPORT_WELCOME):

        LTEXT "This wizard helps you import certificates, certificate revocation lists, and certificate trust lists from a file to a certificate store.\n\n\
      A certificate can be used to identify you or the computer with which you are communicating. It can also be used for authentication, and to sign messages. Certificate stores are collections of certificates, certificate revocation lists, and certificate trust lists.\n\n\
      To continue, click Next.",
          -1, 115,40,195,120
      

      and line 385 in IDD_EXPORT_WELCOME:

        LTEXT "This wizard helps you export certificates, certificate revocation lists, and certificate trust lists from a certificate store to a file.\n\n\
      A certificate can be used to identify you or the computer with which you are communicating. It can also be used for authentication, and to sign messages. Certificate stores are collections of certificates, certificate revocation lists, and certificate trust lists.\n\n\
      To continue, click Next.",
          -1, 115,40,195,120
      

      A solution could be:
      to shorten the strings, or
      cut these controls into several smaller ones, or
      store the long string in a separate resource string, and load it and set it as the static control text at runtime using LoadStringW(). (feels like overkill to me)

      Attachments

        1. LoadString_ButFrenchIsStillTooLongThen_silences.PNG
          9 kB
          reactosfanboy
        2. LoadString_ButFrenchIsStillTooLongThen.patch
          53 kB
          reactosfanboy
        3. proofOfConcept.patch
          7 kB
          reactosfanboy
        4. proofOfConcept.PNG
          51 kB
          reactosfanboy
        5. TheFinalThing.patch
          32 kB
          reactosfanboy
        6. TheFinalThing.patch
          32 kB
          reactosfanboy

        Issue Links

          Activity

            People

              reactosfanboy reactosfanboy
              reactosfanboy reactosfanboy
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: