MapWindow on x64 systems

Mar 13, 2015 at 10:30 PM
So my co-worker just got a new company laptop that runs Windows 7 x64. I develop my application on a Windows 7 x86 machine with Visual Studio 2010. I compile against the .NET4 Framework and AnyCPU.

He installed MapWindow_x64 and ran the app and it crashed.
He uninstalled MapWindow_x64 and installed MapWindow_x86 and it also crashed.
The installations were the same release as what I am using on the development machine for compiling the app. Namely MapWindow v4.8SR.

Am I doing something wrong here? Should I compile my app with a certain target CPU Architecture for x86 and then another for x64? Or is this supported?
Mar 15, 2015 at 1:33 PM
I've just checked MapWindow Lite, it uses x86 MapWinGIS (the ocx) but is compiled as AnyCPU, so it should work.
Perhaps the new laptop doesn't have the correct .NET Framework version or not the proper C++ redistributables?
The installer for MapWindow v4.8.8 should check for that.
What happens if you manually register the ocx on the new laptop, perhaps with elevated admin rights?

Could your co-worker try to install MapWindow Lite (

Mar 15, 2015 at 6:16 PM
The problem here is that I cant use MapWindow Lite as that is a different version that we have deployed around the company. My experience with MapWindow is you have to have the same framework installed on target machines as you use in development. Right now that is 4.8 until we can plan a massive update to the latest release. But we will give that a try. Does the developer have to compile a certain way?

The new laptop is Windows 7 so out of the box it has up to .NET 3.5 and he just installed .NET4. He is the admin of the laptop and installs everything via Run As Administrator.
Mar 16, 2015 at 8:18 AM
MapWindow v4.8.8 is compiled for the same CPU as the ocx. So not AnyCPU but x86 or x64.
You should try the x86 version of MapWindow since it is newer than the x64 version.

After installation a file called regMapWinGIS.cmd is copied in the destination folder. It is just a text file. You can open it and remove the /s in the regsvr command and run the file again as admin. It should give you a message if the ocx is properly installed or not. If it is not, most likely it has to do with rights or missing (C++) dependencies.
If it is registered and mapwindow.exe still crashes you might have issues with .NET Framework. MWv4 needs .NET Framework v3.5.

Don't you get any error message? How do you know it is crashing?
Mar 16, 2015 at 4:00 PM
ok here is where I am at. this is a custom application using the ocx as a map control plus some of the utility DLLs.

Developer machine:
Windows 7 x86
MapWindow 4.8.6 (Final Release) x86
Visual Studio 2010. Compile the application against the .NET4 Framework.
Case #1: Compile against AnyCPU.
Case #2: Compile against x64

Target machine:
Windows 7 x64
The user is the admin of the machine.
All .NET Frameworks installed all the way up to .NET 4.5. He's also a developer so he has Visual Studio 2005 through 2012 installed.
Installed MapWindow 4.8.6 (Final Release) x86 and tried both cases above. Both crashed.
Uninstalled MapWindow 4.8.6 (Final Release) x86 and installed Installed MapWindow 4.8.6 (Final Release) x64. Tried both cases above. Both crashed.
The only error message we get is the "Application has stopped working" message before any part of the GUI is displayed. We then get the option to send information to Microsoft about the crash.,
The MapWindow application itself works.
Mar 16, 2015 at 7:55 PM
Update: after several tests here is what we actually got to work (everything else crashed):

Target machine is Windows 7 x64
The MapWindow v4.8.6 (Final Release) x86 installer
The application compiled against x86

Oddly enough anything with the MapWindow v4.8.6 (Final Release) x64 installer failed. My theory is that the MW application is for x64 but maybe not the OCX.
Also the application compiled against x64 failed with the x86 and the x64 MapWindow installer.

Not sure what is going on internally but got something to work.
Mar 18, 2015 at 8:52 AM
I'm glad you've got it working now.
The MapWindow x64 installer is older than the x86 installer so it is possible something is wrong in it.

If you are just using the ocx in your own application, you don't need to install the full MapWindow application. The ocx-only installer should be enough.

Mar 18, 2015 at 7:32 PM
Well we install the application because on occasion the end user will use MapWindow to view some data. This way they have the MW application and the OCX are available if they need either. We will test some more though.