[CONNECT C++] App. not unloading - prevents build

I've recently come across a problem that I've not encountered previously.  During development, it's commonplace to build an app., load into MicroStation, perform some tests, unload the app. and make some changes.

I unload my app. (*.ma + *.dll), make some modification to the source, and rebuild.  The build fails to complete, with this message...

MicroStation Resource Librarian 03.09.02
### Cannot write to output file: G:\PROGRA~1\Bentley\MICROS~2\MICROS~1\mdlapps\xxxx.ma

Note that it's the .ma file that is apparently locked by MicroStation, not the DLL.  I double-check that the app. really is unloaded (in the Utilities|MDL Apps dialog) but have the same problem.  The build completes only if I exit and restart MicroStation.  As you'll appreciate, this is a little tedious — it gives C++ developers the same pain that .NET developers experience.

Parents Reply
  • Here's some more evidence.  I loaded my app. in two different ways...

    1. manually, from the MDL Applications dialog
    2. automatically, from a MicroStation custom tool palette

    1 Manual Load: Note the resource file count == 1

    2 Auto-Load from Custom Palette: Note the resource file count == 2

    Conclusion

    When an app. is auto-loaded from a custom tool palette, MicroStation opens the .ma resource and doesn't let go.

     
    Regards, Jon Summers
    LA Solutions

    Answer Verified By: Jon Summers 

Children