Windows: Is the exe or DLL 32-bit or 64-bit?

Every so often, I have a customer send me an email with a IBM MQ message like the following:

Channel program ‘TEST.CHL’ ended because user exit ‘C:\Capitalware\MQAUSX\mqausx(SecExit)’ is not valid.
Architecture of the exit library does not match the process’s architecture which is ’64’ bit.

MQAUSX is just an example, as it could happen with any other Capitalware product.

For Windows, MQAUSX has 2 installers:

  • mqausx-server-setup.exe for 32-bit version of MQAUSX
  • mqausx-server-64-setup-MQv8.exe for 64-bit version of MQAUSX
  • It is easy for someone to select and run the wrong installer. Or sometimes, a user will simply copy the DLLs from one server to another server and not realize that the platform architecture (32 vs 64-bit) is different. If the user does then MQ will output the above error message.

    Windows does not include a program like “file” for Linux/Unix. Yes, there are several options that users can install:

  • “dumpbin” included with Visual Studio
  • Dependency Walker
  • Process Explorer
  • But sometimes you just want a simple command line tool. Hence, I decided to create a Windows command line program called is32or64 that will take file name(s), either executable (“exe”) or DLL, as parameter(s) and output if the named file is 32-bit or 64-bit.

    You can download is32or64 from here. The download archive contains 3 files:

  • bin32\is32or64.exe (32-bit release)
  • bin64\is32or64.exe (64-bit release)
  • ReadMe.txt
  • Example:

    C:\>is32or64.exe C:\Windows\regedit.exe C:\Windows\difxapi.dll
    C:\Windows\regedit.exe: 64-bit
    C:\Windows\difxapi.dll: 64-bit

    Enjoy.
    Regards,
    Roger Lacroix
    Capitalware Inc.

    This entry was posted in Capitalware, Licensed As Free, MQ Authenticate User Security Exit, Operating Systems, Windows.

    Comments are closed.