Results 1 to 7 of 7

Thread: GetCurrentDirectory

  1. #1
    Guest
    How do you establish your current directory using the API?

  2. #2
    Member
    Join Date
    Oct 2000
    Posts
    39
    Public Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectory" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long


    is that what you are looking for?

  3. #3
    Guest

    Yah Mahn

    I found this in the API viewer and have tried to use it my code and can't get it written correctly. Any suggestions?

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up

    To get your current application directory, you can use the App object in VB like app.path. No need to use the [b]GetCurrentDirectory[b] API function.

  5. #5
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238
    I also encounter the following error when calling the GetCurrentDirectory API function:

    Run-time error '453'
    Can't find the DLL entry point in kernel32

  6. #6
    Guest

    Smile app saver

    Thanks alot Chris I program in asp ado and xml, don't know a whole lot about vb except what I get out of the help files. I thought that I would have to program this out of the api. Sure is nice to get some pointers from somebody who knows vb. Thanks.

  7. #7
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up

    I also new in ASP, If you really need to know the current directory of your application. You still can use the App object with normal VB coding, but all you need is just compile your code into COM and run it under the MTS.

    Hope this can give you some tips too.

Posting Permissions

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



Click Here to Expand Forum to Full Width