Document ID:        37758.1
Subject:            Call to Undefined Dynalink - Possible Causes and Actions
Last Modified:      02 Apr 96 
Author:             DBOOTH


Application Error: Call to Undefined dynalink
---------------------------------------------

Recently, a number of customers have reported the following error when
running Oracle applications under windows.

        'Application Error: Call to Undefined Dynalink'

This bulletin documents the probable causes of this error as well as actions to
take to try to resolve the problem.

'Call to Undefined Dynalink' is a Windows error. It generally  means that:

        - A program or Dynamic Link Library (DLL) is calling another DLL
          which cannot be found.

        - A DLL is being invoked and is missing a function or the function
          takes arguments that differ from those being passed by the DLL

This error can be reported by a variety of Windows applications including
Developer/2000 and Designer/2000.

Possible Causes of Error
------------------------

1) Failure to find DLL file(s).

   Incorrect directories on the Dos PATH variable may cause the
   above error.

   Action: Check that your PATH variable includes the correct
           directories eg. c:\orawin\bin and c:\windows. We recommend
           that you put c:\orawin\bin at the front of the PATH i.e. make
           it the first directory on the PATH.

 2) Duplicate or incompatible copies of DLL file(s) in different
    directories.

    For example, Oracle Required Support Files (RSF) should be located in
    the c:\orawin\bin directory only.
    Check for duplicate copies of these files in other directories
    particularly c:\windows and c:\windows\system.
    Also locate and eliminate duplicate or incorrect versions of Tools
    Utilities (TUs) and GUI Common files stored in directories other than
    c:\orawin\bin. To find out the names of the DLLs installed for RSFs,
    TUs and GUI Common files look in the following .map files in
    c:\orawin\orainst:

        rsf71.map
        rsf70.map
        tutil25.map
        gui20.map
        gui25.map

   In addition, ensure that the Microsoft Required Support Files listed in
   c:\orawin\orainst\ssf20.map are located in the c:\windows\system
   directory only.

   Action: Get rid of duplicate copies of DLL files.

   Installing new releases of software on top of old versions of the same
   software may lead to the existence of incompatible versions of DLL
   files.
   Examples:

   a) Installing Designer/2000 release 1.2 on top of Designer/2000 release
      1.1.

   b) Mixing and matching different software. For instance, upgrading
      software from distribution media other than the Designer/2000 CD,
      viz. loading Oracle forms or Reports from the Developer/2000 CD,
      which have different release numbers from Designer/2000, into the
      ORACLE_HOME directory used by Designer/2000. Thus ending up with,
      say, release 1.1 of Developer/2000 residing with release 1.2 of
      Designer/2000.

   c) Also note that installing a later version of one product such as
      Oracle Graphics may affect an existing version of other products
      (eg.Forms or Reports or Designer/2000) by introducing incompatible
      DLLs.

   Action: Deinstall the client software, remove or rename the oracle.ini
           file and reinstall the client software again. In the case of
           Designer/2000, in a client/server environment, we generally
           recommend that customers install the client software into an
           empty or virgin ORACLE_HOME (normally named 'orawin') and allow
           the Oracle Installer to create a new copy of the oracle.ini
           file.

           Avoid installing software from distribution media other than the
           Designer/2000 CD. This is because the level of dependency
           between the CASE software and its dependent products is very
           high. In some situations, it may be necessary to install other
           Oracle software into a different ORACLE_HOME directory and
           configure your system to switch between the CASE software
           install and the other software install.

3) An uncommon cause of the 'Call to undefined Dynalink' error is the
   inability of an application to write to the working directory. This may
   be because the default working directory is on a non-writeable network
   drive.

  Action: Make sure that you can write to your default working directory.
          The working directory is best located on a local drive.
          Also make sure that the TMP variable in the autoexec.bat file is
          set to write to a local drive eg. SET TMP = C:\TEMP.
          If you are using Microsoft Windows' "item property" to set your
          working directory, ensure that the working directory points to a
          local writeable directory (item property for a directory or the
          DOS ATTRIB command will tell you if your directory is read-
          only).

Other actions that can be taken to resolve the above error are:

1) Use the INFOSPY utility (Compuserv - GO WINUTIL, search on Infospy)
   to check the DLLs that are loaded into memory. This information can be
   used to check for any unusual DLLs. Also Worldwide Support may be able
   to replicate the error and check your list of loaded DLLs against the
   the list that they produce.

2) Use the following command:

        C:\  dir *.dll /s |sort > c:\dlls.txt

   to obtain a sorted list (alphabetic order) of dlls for the specified
   drive and directory. Sample output from the command is below:

   MFC250   DLL       320,832 13/01/95   14:10
   MFC250D  DLL     1,815,932 16/09/94   14:00
   MFCCLSWZ DLL       418,928 16/09/94   14:00
   MFCD250  DLL        51,632 13/01/95   14:10
   MFCD250D DLL       519,656 16/09/94   14:00
   MFCO250  DLL       125,344 13/01/95   14:10
   MFCO250D DLL       970,464 16/09/94   14:00
   MFCOLEUI DLL       146,976 13/01/95   14:10
   MHCARDS  DLL       244,192 28/05/91   17:26
   MHRUN300 DLL        58,192 21/09/93   17:30
   MMC20WIN DLL       105,216 13/12/94   14:05
   MMI20WIN DLL       143,648 13/12/94   14:14
   MMM20WIN DLL         4,736 13/12/94   14:01
   MMS20WIN DLL       114,976 13/12/94   14:08
   MMSYSTEM DLL        61,648 11/11/93    3:11

   This output can be used to verify the size and date of DLLs as well as
   showing duplicates.

3) Try isolating the problem by testing the different software layers
   such as sqlnet, sqlplus etc. separately. This can be done by building up
   the stack, that is, working from the bottom up and establishing whether
   each layer works. For example, use PING to verify that the network and
   its drivers are working correctly. Then use NETTEST to verify
   that SQL*Net is working correctly. Invoke SQL*Plus which doesn't use
   Oracle Toolkit to make sure that this is working; invoke Oracle Forms
   which uses Oracle Toolkit to see if this causes a problem ; etc. Using
   this approach, you will get a general idea about which group of DLLs is
   likely to contain the problem.

Acknowledgements
----------------
Many thanks to Jav Hussain for making valuable suggestions.