Hi all, I hope someone may be able to help me with the question and the problem below.

I am currently developing a free-standing app which is called out of a Geosoft GX. It opens its own windows and dialogs etc. I am using Oasis Montaj 8.4 (yes, I know it’s not the latest!). What’s supposed to happen is that the GX (fired from the usual Montaj framework) cranks up the app and passes the name of the current database to it via a command-line argument. That’s all very straightforward and works fine. I have the following question and problem (only one each at the moment):

Question: If I leave my app in a non-Geosoft directory, the GX starts it but the app refuses to open the database which is passed as the argument. Here’s a bit of debug info (from the third line onwards is generated by Geosoft):
pGeo created
Try to open database
Open DB failed
BindFunc
Unable to locate error message 31009.
Please make sure the appropriate GER files are present.
31009
So I hunted around the GER files, even put them into my current dir but no joy. I found message 31009 which says:
!Unable to bind the "%1" wrapper function. The DLL may not be present or a license may be missing.
That’s not too helpful – my licence works and, if a DLL is missing, it would be cool to know which one.
Now, if I just take my app’s executable and drop it in the Geosoft bin directory, everything is fine.
Incidentally, just getting the app to start from a different location was a pain and required me to copy over 21 DLLs.
So, the question is: There is obviously some bit missing, but what can I do to run the app without polluting the Geosoft folder?

Problem: When I crank up my app from the GX it works well, opens the database, gets lists of channels and lines etc. But when I try and write some calculated data back to the database, it tells me:
Open DB failed
BaseBF::sChSize
Error attempting to modify the c:\Customer\Play\body.gdb file opened for Reading.
20609
On the other hand, if I “manually” run the app and Geosoft is not running, all works OK. So, obviously the running copy of Geosoft (which started the GX which started my app) is preventing the app from writing back to the open database. This is not so nice. How can I get Geosoft to either open the database in shared mode or let go of the thing while I am messing with it?

Comments

  • Hello,

    The steps outlined here https://geosoftgxdev.atlassian.net/wiki/display/GXD84/Using+the+GX+API+Externally may you out.

    Would you be able to share your code with us (outside of the forum)?

    Joseph
  • Hi Joseph

    Thanks for the link in the manual which I somehow managed to miss the relevance of.

    I made a fresh folder, dropped in my executable and all the files and subdirectories from C:\Program Files (x86)\Geosoft\GX Developer\redist\bin. The app winds itself up, but I get

    Open DB failed
    BindFunc
    Unable to bind the "[email protected]@[email protected]@[email protected]" wrapper function. The DLL may not be present or a license may be missing.
    31009

    I made sure there was a geosoft.key file in the same folder - there was. When I replaced this with the geosoft.key file from the Geosoft installation dir (this file contains the line "Desktop Applications") the app died on me in the call to pCreate_GEO.

    I then tried the whole registry approach as outlined in the link: added extra keys and strings with appropriate settings, set up the geosoft.key, made sure the app name was correct all the way through. Since I am running Win7 I parked the extra keys in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Geosoft... In all cases the upshot was

    The program can't start because geodist.dll is missing from your computer.

    from which I must deduce that pCreate_GEO is not picking up the correct registry entries. I'm a bit baffled.

    In answer to your question, I am happy to share my code outside the forum. Please drop me an email at doofer 'at' mweb.co.za, and I'll take it from there.

    Reiner
  • Hi Rainer,

    We received your files and will investigate.

    Joseph
  • Many thanks to Joseph for sorting out the problem. In order to be able to write back into the database from an app that was started from a GX, unload the database in the GX before starting the app, then re-load the database when returning back into the GX.
    Reiner
This discussion has been closed.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!