How do I know I’m running in 32 bit mode (if I’m on a 64-bit system) and when (mostly never) would I want to

By reeset / On / In MarcEdit

As a rule, you shouldn’t be running in 32-bit mode when working on a 64-bit system.  In fact, MarcEdit is compiled in a way so that the program will run automatically at the appropriate bit depth for your operating system.  So, if you have a 32-bit system, MarcEdit will automatically be configured to run in a 32-bit environment, and the executable will run as a 32-bit executable.  If you are on a 64-bit system, regardless of it you used the 32-bit installation package, the program will run itself as a 64-bit application.  The program is designed, by default, to take advantage of the benefits native to each of the different processor types.

Why are their two installation programs them?

Great question….while MarcEdit’s components will automatically configure themselves to run at the operating system bit depth, problems arise if you are going to program against MarcEdit…i.e., use the COM objects or access the .NET components and build tools or scripts around the application.  On a 64-bit system. the scripting engine is a 32-bit application (by default), so in order for MarcEdit to expose it’s programming components on a 64-bit system so that they can be accessed by either a 32 or 64-bit process, you need to install using the 64-bit installer.  This installer makes sure that appropriate references are added not only to the registry, but to the windows 32-bit emulation layer, so that the underlying programming components can be utilized by 3rd-party applications.

When would I want to run MarcEdit in 32-bit mode, if I was on a 64-bit system?

Generally, never.  And in fact, there is never a reason when using MarcEdit’s normal functions, when this would be appropriate.  However, MarcEdit has been designed to work with 3rd-party tools as well.  And this is where it gets tricky.  OCLC’s Connexion is a widely used application in the library metadata space (probably, the most widely used tool since it provides primary access to WorldCat for catalogers), but it is also a 32-bit application.  A long time ago, in a galaxy far, far away (sorry, I’m also watching the live stream waiting for the new Star Wars trailer 🙂 ), I had need to be able to work with data in Connexion in a batch process.  Sure, Connexion has macros, but the way these works, Connexion essentially opens and closes individual records, over, and over again.  It’s not very efficient.  So, I wrote a plugin for MarcEdit.  And I wrote it before 64-bit windows became the norm.  Well, as that changed, the plugin stopped working, because a 64-bit version of MarcEdit could not work with a 32-bit version of Connexion.  This is a general rule of computing — like ghostbusters, you cannot cross the streams.  So, a work around was created.

The most awesome part of the .NET framework, is that since the code is byte code, I can tell it some things before a program runs.  And this is what happens here.  The “Run MarcEdit in 32-bit Mode” creates a 32-bit process around MarcEdit, allowing the program to execute within that space.  And in that space, MarcEdit can interact directly with Connexion.  I made a quick video demonstrating how this works:

After making this video, I realized something.  It’s really hard to know if MarcEdit is actually running in this compatibility mode — there really aren’t visual cues, outside of the command box that opens initially.  And, this actually is going away.  I made a couple changes to the program to update this process as the .NET framework includes some new options that I can take advantage of to make this a better process.  So, to make this clear, I’ve done a couple things.  When you run MarcEdit in the 32-bit mode (and only in this mode), the title of the main window will be updated.  You can see this here:

In order to make it easier to see that the program has been started in the compatibility mode, the program will update the program title, adding *32 to the main window.  This only shows up in the main window, but since this is visible when the program reboots, it should be a visual cue to the user that it is now possible to run the Connexion plugin and interact with Connexion, regardless of if you are using a 64-bit version of Windows.

Questions?  Let me know.

–tr