Announcement

Collapse
No announcement yet.

Verify Path API

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Verify Path API

    Hello All,

    Is there an API call that verifies a drive + path?

    Thanks
    Jason


    ------------------

  • #2
    I don't know about an API call, but the following works fine:

    FUNCTION PathOK&( BYVAL Path$)

    IF LEN(DIR$( Path$, 16)) THEN
    FUNCTION = -1
    ELSE
    FUNCTION = 0
    END IF

    END FUNCTION

    ------------------
    Bernard Ertl
    InterPlan Systems

    Comment


    • #3
      GetFileAttributes (Ex) = GetAttr
      FindFirstFile (Ex) = Dir$



      ------------------
      E-MAIL: [email protected]

      Comment


      • #4
        Thanks for your posts I'll take a look.

        Jason

        ------------------

        Comment


        • #5
          This API call will verify the path AND create the entire path if it does not exist.
          Code:
          Declare Function MakeSureDir LIB "IMAGEHLP.DLL" Alias _
                  "MakeSureDirectoryPathExists" (lpDirName As Asciiz) As Long
          
          Function PbMain() As Long
              Dim RetVal As Long
              Dim DirPath As Asciiz*256
              ' The trailing \ is necessary
              ' if the directory path does not exist, it will be created
              DirPath = "C:\murphy\test\temp\junk.jnk"
              RetVal = MakeSureDir(DirPath)
          end function
          Joe Murphy

          ------------------


          [This message has been edited by Joseph W Murphy (edited January 23, 2001).]

          Comment


          • #6
            Does that dll ship with 95/98/ME/2000?

            Jason

            ------------------

            Comment


            • #7
              As far as I know the earliest version that had the DLL was Win 95B
              I believe that it is part of Microsoft Internet Explorer.
              Every PC that our company (over 200) has this DLL installed, but then as part of Y2K remediation every PC (even those with Win95a) has MSIE 4.02 or greater installed.

              Joe

              ------------------

              Comment

              Working...
              X