| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Visual Basic 6.0 Programming Ask questions about VB 6.0 (or earlier versions) or help others by answering their question. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
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: KPDTeam@allapi.net Dim sSave as string 'create a buffer sSave = string(255, 0) 'retrieve the current directory GetCurrentDirectory 255, sSave MsgBox sSave End Sub |
|
#3
|
|||
|
|||
|
Re: HOw can I call GetCurrentDirectory() from VB?
Thanks. It is great!!
~Kareem~ Dont forgot to rate it !!! http://www.abkareem.com ------------------------------------ |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|