1

I made a C++ DLL plugin statically linked to MFC for a certain program (I don't have its source code) using VS2008.

After integrating my plugin to the software, everything worked fine except for a string resource which corresponds to my plugin's name and which I declared in my resource file as follows :

    STRINGTABLE  
    LANGUAGE 9, SUBLANG_DEFAULT
    BEGIN
        IDS_PRC_TEST "TEST"
    END 

then I defined it in the "resource.h" header :

    #define IDS_PRC_TEST            210

My problem is that on the plugin list in the software I only get the first letter of this string resource the "T" from "TEST".

  • I verified the compiled resource file (.res) and it is OK

  • I've also verified the dll I built ,using the 'Resedit' program, and the resources are all OK ("TEST" is entirely in the dll)

  • Then I compared the resources of my plugin with the resources of another plugin (available with the software) for which the name appeared entirely. There was no difference between the resource declarations.

So I do not see why my string resource isn't entirely loaded if the one from the other plugin is.

Please feel free to ask me questions to clearify my explanation if it wasn't clear enough.

Thank you in advance for your answers.

Marco A.
  • 43,032
  • 26
  • 132
  • 246
Norbulak
  • 23
  • 4
  • Unicode/Multibyte problem? – Alex F Jan 09 '14 at 13:20
  • You might want to delete the corresponding .aps and .res files and repeat your steps to rebuild the dll. I've seen situations where the resource appears to be correct but somehow is out of sync until those two files are deleted and rebuilt. That typically is caused by manually updating a resource outside the resource editor. – rrirower Jan 09 '14 at 13:33
  • thank you for answering so quickly. -in the manifest the encoding is UTF-8 (I'm not sure if it is realevent but I've tried changing it with no results ) -I deleted all files and rebuilt from scratch, the results are the same. – Norbulak Jan 09 '14 at 13:44
  • I was changing the character set in the wrong way(directly in the manifest). I've changed it in the project properties and IT WORKED ! thanks a lot for your help ! – Norbulak Jan 09 '14 at 14:05
  • @Norbulak The `encoding` attribute in the application manifest designates the character encoding used by the *manifest* file. It is unrelated to the character encoding used for compiling the source code. – IInspectable Jan 09 '14 at 16:31

1 Answers1

0

Thanks to the comments on the question I got this fixed. It was indeed a Unicode/Multibyte problem. So all I had to do is change the project's encoding in the Project->Properties->Configuration properties->General

Norbulak
  • 23
  • 4