CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 1999
    Location
    TVM, Kerala, India
    Posts
    210

    HOw can I call GetCurrentDirectory() from VB?

    Hi gurus,
    How can I call GetCurrentDirectory()from VB.
    Thanks,
    Kareem.

    ~Kareem~
    Dont forgot to rate it !!!
    http://www.abkareem.com
    ------------------------------------

  2. #2
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868

    Re: HOw can I call GetCurrentDirectory() from VB?


    private Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectoryA" (byval nBufferLength as Long, byval lpBuffer as string) as Long
    private Sub Form_Load()
    'KPD-Team 2000
    'URL: http://www.allapi.net/
    'E-Mail: [email protected]
    Dim sSave as string
    'create a buffer
    sSave = string(255, 0)
    'retrieve the current directory
    GetCurrentDirectory 255, sSave
    MsgBox sSave
    End Sub





  3. #3
    Join Date
    Sep 1999
    Location
    TVM, Kerala, India
    Posts
    210

    Re: HOw can I call GetCurrentDirectory() from VB?

    Thanks. It is great!!

    ~Kareem~
    Dont forgot to rate it !!!
    http://www.abkareem.com
    ------------------------------------

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

Featured