Bitness Mismatches After Migration: How to Detect and Prevent Issues
When migrating your Uniface environment—especially to new hardware or operating systems—you might encounter a common obstacle: bitness mismatches between Uniface and third-party components like DLLs or database clients (e.g., Oracle). These mismatches often happen when 32-bit and 64-bit components are mixed unintentionally, leading to errors that can be tricky to diagnose.
How Do You Know If Bitness Mismatch Is the Issue? Here are some typical symptoms that point to a bitness mismatch:
- Uniface fails to start or crashes immediately.
- DLL load errors appear (like “Cannot load DLL” or “Invalid format”), error codes # -150/-155.
- Database connectivity issues, especially with Oracle clients.
- Unexpected or inconsistent behavior in components that depend on external libraries.
If you notice these symptoms after migration, it’s a good idea to check the bitness of your environment components first—that can save a lot of troubleshooting time.
Quick & Easy Ways to Check Bitness
Here are straightforward methods to determine whether your components are 32-bit or 64-bit:
1. Check System Architecture Using Windows File Paths
On Windows, the presence (or absence) of certain directories helps identify system architecture:
- For 64-bit systems: The directory C:\Windows\System32\Boot exists.
- For 32-bit systems: This directory does not exist.
How to check: Use Uniface’s $fileexists function:
- Plain Text
- $fileexists("C:\Windows\System32\Boot")
- Returns 0 if the directory doesn't exist (likely a 32-bit system).
- Returns 2 if it exists (a 64-bit system).
2. Check DLL Bitness With the file Command
If you have tools like Cygwin or Git Bash installed, you can examine DLLs directly:
- Plain Text
- file uenc.dll
- Output for a 64-bit DLL:uenc.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
- Output for a 32-bit DLL:uenc.dll: PE32 executable (DLL) (console) Intel 80386, for MS Windows
You can automate this check in Uniface with spawn OSCOMMAND. to streamline your process.
3. Query Windows Registry Settings
On 64-bit Windows, 32-bit applications and components are registered under a special section:
Plain Text
$setting("", "[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node]", "REGDATA")
- If the key exists, your system has 64-bit architecture with 32-bit components registered.
- If the key does not exist, it’s likely a 32-bit system.
Best Practice Tips
- Always verify the bitness of Uniface, DLLs, and database clients before deployment. Especially after migrations, this helps prevent runtime errors and connectivity problems.
- Keep a checklist of component architectures to ensure all parts are compatible.
Final Thoughts
Bitness mismatches are a common, solvable issue that can be easily prevented with a few quick checks. Taking the time to verify component architectures upfront will help ensure a smooth migration process and reliable operations after deployment.
If you'd like more tailored guidance or support, our Rocket Uniface team is here to help you navigate these technical challenges with confidence.



