Start a new topic

mgInit & mgExportDB

Original Post by: SCGrant327 Wed Jan 19 21:43:12 2011

When running my custom app, using the 4.1 API...mgInit reports that the API Version is 3.0.1, is this normal/OK?

Also using the above info, when I try to export a DB to ANY of the 16.x formats, I get an "Unknown export file format version" error...why is that?



Original Post by: ChrisRogers Wed Jan 19 21:58:31 2011

The OpenFlight API is a set of dlls. This means that even if you developed your app using OpenFlight API 4.1, the app will use the version it finds during run time. It is most likely finding old versions of the API dlls on your system. Windows will look for dlls in the following locations and in the following order:

1.The directory from which the application loaded.

2.The current directory.

3.The system directory. Use the GetSystemDirectory function to get the path of this directory.

4.The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.

5.The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.

6.The directories that are listed in the PATH environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path.

You can use the program Dependency Walker (depends.exe) to determine what dlls your app is actually using and their locations. You may have this program already in visual studio 6's tools start menu. If you don't you can find the free download online with a quick google search. (This is not a Presagis program, so check with your IT department or your company policy department to make sure you are allowed to download and use this program.) To use it just drag your application on top of depends.exe. It will list all the dlls the application depends on and where they are found (if you use the view full paths option). It will most likely show you that the OpenFlight API 3.1 dlls are found and used somewhere you didn't expect.

Original Post by: SCGrant327 Wed Jan 19 22:01:56 2011

That was it...just copied the DLLs into the app folder and *poof*.

Sometimes my blonde gets the better of me...

Original Post by: ChrisRogers Wed Jan 19 22:31:01 2011

This sort of thing happens to me all the time. :)

Login to post a comment