Changing the Language ID?

Mar 16, 2011 at 8:25 PM

I wonder if you can help me please.

I have a resource-only DLL and want to change the "ProductName" and "OriginalFilename" in the Version information.  I can do this without a problem in C++ and VS2010.

Now, I also want to change the language ID in both the 'VarFileInfo\Translation' section and the 'StringFileInfo' section.  I do not want to add a new translation section but just to change the one that is there.  I can't seem to do this with the C code I have. I even tried reading in the current 'VarFileInfo\Translation' and the 'StringFileInfo' sections, deleting them from the module and then adding them back with the new language ID.

Can this be done with ResourceLib?

If so, I would be very grateful for the complete C# code to do this as I have not got around to learn this language yet (all my applications are still MFC C++!) and have no idea where to start.

The new LanguageID would be a parameter to the program (as would be the relative path to the DLL) e.g. 0x0407 for Germany etc. but the CodePage will always be 0x04b0 (1200) for Unicode.

Many thanks in advance.

Mar 19, 2011 at 4:04 PM

Yes, it can be done with ResourceLib. 

You should check out the docs, there are samples. Also this code uses ResourceLib and does a lot of similar things.