Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DLL usage in Access (A2003)

    (Edited by HansV to make URL clickable - see <!help=19>Help 19<!/help>)

    Hello

    I hope this is the right forum. Not sure if the problem is with Access or with Windows.

    I developed an Access frontend on my WinXP Pro computer. It relies on two DLLs that I've copied into the WindowsSystem folder. Everything works properly. Move the program onto another WinXP Pro computer and copy the FE and two DLLs to the new computer. Works fine. Copy the FE and two DLLs onto a third computer using the same folders, and it fails. Access issues a message that it cannot find the DLL. Then I go into the Declare Function statement and hard-wire it to the file that I *know* exists, and it still fails. Any idea what else to look at to resolve this issue?


    Option Compare Database
    Option Explicit

    ' tried hard-wiring this line to fully-qualified pathname of the DLL - no joy
    Declare Function pjInitPlus Lib "proj_api.dll" _
    (ByVal definition As String) As Long


    The DLL came with a sample database that contains an example call to the DLL. The example database literally consists of a single module. It works fine on two computers; not at all on the third computer. FWIW, the dll came from http://trac.osgeo.org/proj/ near the bottom of the page is Proj4 VB Wrappers.

    Thanks.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: DLL usage in Access (A2003)

    I can't get it to work in Word or Access, whether I explicitly specify the path or not. I also tried moving the DLL to the WindowsSystem32 folder, and registering the DLL, without success.

    Perhaps the DLL expects a runtime component that is present on some but not all computers?

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DLL usage in Access (A2003)

    Thanks, Hans. At least that confirms it's not unique to one computer.

    I just returned home and found some additional documentation on my home computer. One file makes reference to a PROJ_LIB environment variable. The offending computer is back at the office, but I will try this on Monday.

    PROJ 4.4.6 WIN32 Binary Release
    ===============================

    This is a package of pre-built binaries for PROJ 4.4.6 for Win32 systems.
    After the package is unpacked the PROJBIN directory should be added to
    your path.

    eg.

    C:> set PATH=%PATH%;C:PROJBIN

    If you unpack the distribution somewhere other than C:, you will also
    have to set the PROJ_LIB environment variable so that PROJ can find
    initialization files.

    eg.

    C:> set PROJ_LIB=C:SoftwarePROJNAD

    Once these steps are complete, you should be able to use the various PROJ
    utilities from the commandline.

    eg.

    C:> proj.exe -I +proj=utm +zone=11 +ellps=WGS84
    332000 4000000 (input)
    118d52'1.182"W 36d7'48.593"N (output)
    <cntl-Z>
    C:>

    See the PROJ.4 web site for more details on PROJ.

    http://www.remotesensing.org/proj

    Those wanting to use PROJ.4 DLLs for other applications like MapServer
    can just copy the PROJBINPROJ.DLL file, and ignore the .EXE files.
    However, the PROJ_LIB environment variable will still need to be set to
    enable use of initialization and datum grid shift files.





    As always, I appreciate your help.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •