4 Replies Latest reply on Aug 27, 2002 8:45 AM by 3542

    Preventing a GPF when using oo4o in a DLL on Oracle 8.1.7

      We have developed a DLL that uses oo4o that is called from a Power Builder application.

      It works on all Oracle Client versions except 8.1.7. When the Power Builder application exits then a GPF occurs at 0x77f83a33 in OCI.DLL.

      After lengthy investigations into the cause of the problem we have found that it is caused by the way the the OCI is initialised. The Power Builder app is initialising it one way (we can not change this because it's embedded in the Oracle Driver) and our DLL initialises differently. In previous versions of OCI multiple initialisations were ignored which explains why it is only a problem with 8.1.7.

      So, my question is: How do I control the way the OCI is initialised by oo4o. This is how I would like to initialise the OCI:-

      OCIInitialize ((ub4) OCI_DEFAULT | OCI_OBJECT, 0,
      (dvoid * (*) (dvoid *, size_t)) 0,
      (dvoid * (*) (dvoid *, dvoid *, size_t)) 0,
      (void (*) (dvoid *, dvoid *)) 0);

      However, it would appear it's trying to initialise as follows:-

      OCIInitialize ((ub4) OCI_THREADED | OCI_OBJECT, 0,
      (dvoid * (*) (dvoid *, size_t)) 0,
      (dvoid * (*) (dvoid *, dvoid *, size_t)) 0,
      (void (*) (dvoid *, dvoid *)) 0);

      I thought I'd found the answer by using the "ThreadingMode" parameter of OStartup. However, changing this value had no effect.

      Hope you can help.

      Adrian Capp
      LBS Limited, UK