If you have developed a user-defined surface, object etc for Zemax, and need to recompile it to work with the 64-bit version of Zemax, it's easy. Changes need to be made to the source code to compile x32 or x64 compatible DLL’s. All that needs to change is a setting in the compiler.
Authored By: Tawnya Martin
Compiling to x32 and x64 platforms
If you have written a user-defined feature as a dll, you must compile two different versions, one for 32-bit versions of Zemax and the other for 64-bit Zemax. Fortunately, this is a simple task. No changes need to be made to the source code to compile x32 or x64 compatible DLLs. All that needs to change is a setting in the compiler. In Visual Studio 2008;
1. Go to Build > Configuration Manager
or, use the shortcut bar directly;
2. Under the Active Solutions Platform, select New;
This option should now be available to select under Active Solution Platform;

3. Select the platform you require then compile the DLL. You may compile both 32 and 64 bit versions of the DLL using the same settings, same header and source files etc, by just toggling between the two options within this switch:

