[quote user="Christian M"] After compiling the code in Visual Studio 2015, the ofstream/ifstream does not crash on Connect Update 5, OpenRoads Designer or AECOsim. However, it does crash on Connect Update 3[/quote]
Viz Studio 2015 tools build a binary for MicroStation 10.05 that is incompatible with an earlier version of MicroStation CONNECT.
Viz Studio 2013 tools build a binary for MicroStation 10.04 and earlier that is incompatible with a later version of MicroStation.
It's the C++ compiler and linker that lay out binary structures in your DLLs. It's the different, Viz Studio dependent, binary structures that create the incompatibility.
Configuration File Processing
You have to devise a Windows environment that lets you segregate the DLLs into, say, MS_MDLAPPS_10_04 and MS_MDLAPPS_10_05. Then append that path to MS_MDLAPPS using some configuration file logic that works out which version of MicroStation is starting up...
MS_MDLAPPS_10_05 = //DevServer/CONNECT/bin/10_05/ # Put your Viz Studio 2015 DLLs here MS_MDLAPPS_10_04 = //DevServer/CONNECT/bin/10_04/ # Put your Viz Studio 2013 DLLs here # pseudo-code %if (MicroStationVersion10.05) then MS_MDLAPPS > MS_MDLAPPS_10_05 %endif %if (MicroStationVersion10.04) then MS_MDLAPPS > MS_MDLAPPS_10_04 %endif
_VERSION_x_xx configuration variable
# _VERSION_x_xx The _VERSION followed by the current major and minor version, defined but has no value.
Unfortunately that information is incorrect. I'm running CONNECT 10.05, and the only _VERSION variable I can see is _VERSION_10_0. That is, the minor version number is not included.
I'm open to suggestions from Bentley Systems about a solution to that question. How do we determine the MicroStation version using configuration file logic? We need to be able to find both the major and the minor version.