1
votes

I'm migrating a Visual C++ / MFC application to 64-bit. The application uses AppTranslator for localization, which based on the resource dll and its own "apt" file creates a localized resource dll for every language. This dll is then loaded with "LoadLibrary" - which fails in the case of 64-bit resource dlls.

Are you aware if AppTranslator supports 64-bit applications? Do you have any recommendation for a localization tool which supports 64-bit and could import our existing localizations from AppTranslator?

EDIT: Dumpbin gives the following file header on the original resource dll:

FILE HEADER VALUES
            8664 machine (x64)
               2 number of sections
        54B62F13 time date stamp Wed Jan 14 10:55:47 2015
               0 file pointer to symbol table
               0 number of symbols
              F0 size of optional header
            2022 characteristics
                   Executable
                   Application can handle large (>2GB) addresses
                   DLL

while the dll created by AppTranslator has

FILE HEADER VALUES
            8664 machine (x64)
               2 number of sections
        4141A80C time date stamp Fri Sep 10 16:11:40 2004
               0 file pointer to symbol table
               0 number of symbols
              E0 size of optional header
            210E characteristics
                   Executable
                   Line numbers stripped
                   Symbols stripped
                   32 bit word machine
                   DLL

Interestingly, the file created by AppTranslator has a "32 bit word machine" in addition to the original resource dll. Any ideas?

1
I don't think your problem is with the tool. Resource only dlls are not typically built for 64 bit since they do not contain any code. When creating a Resource-only dll, you typcially start with a win32 project. You should verify that the resource only dll is built with the linker option /NOENTRY.rrirower
You must be right to some extent because I haven't seen anyone complaining about AppTranslator x64 support. However, I already have the /NOENTRY linker option.hernyo
Did you ever figure this out? We are phasing out our 32-bit releases so want to build our translation DLLs from our 64-bit exe, but are hitting the same error.Doug Porter
I figured it out. Changed LoadLibrary to: LoadLibraryEx (strFilename, NULL, LOAD_LIBRARY_AS_IMAGE_RESOURCE | LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE ); and now I can load app translator built DLLs from 64 bit exes.Doug Porter

1 Answers

0
votes

I use the 32 bit build of my application with appTranslator to create the DLL files.

Then I simply use those DLL files with my 32 bit or 64 bit builds of the application.

That has worked fine in my case for years.