Hi,
Yes and no. Tht batch files do 2 thing.
- They register the right MapPoint version
- They copy a file with a class so that compiled program know what mappoint version it need.
This way it can detect on runtime he is talking with the right mappoint before generating errors and give the user a warning.
In both of my MP folders I have batch file with this content:
Code:
MapPoint.exe /registerserver
copy MPVersion.cs C:\Ontwikkeling\NET\VC#\MP
So they register the right mappoint and copy the MPVersion.cs to a shared folder used in all my mappoint projects. Content of file is just the MP version:
Code:
namespace MPVersion
{
public static class MPVersion
{
public const int Version = 13;
}
}
Version 13 if MP2006 and 11 is MP2004. At runtime I compare the compiled version and the version in the Version property of the MP control and if they dont match I generate a warning and quit the program.