• DLL usage in Access (A2003)

    Author
    Topic
    #456937

    (Edited by HansV to make URL clickable – see Help 19)

    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/%5B/url%5D near the bottom of the page is Proj4 VB Wrappers.

    Thanks.

    Viewing 0 reply threads
    Author
    Replies
    • #1143843

      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?

      • #1143870

        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)

        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.

    Viewing 0 reply threads
    Reply To: DLL usage in Access (A2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: