'Set Current directory using SetCurrentDirectory API
'Set Current directory using SetCurrentDirectory API
API Declarations
Private Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectoryA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Rate 'Set Current directory using SetCurrentDirectory API
(1(1 Vote))
'http://www.geocities.com/marskarthik
'http://marskarthik.virtualave.net
'Email: [email protected]
Private Sub Form_Load()
Dim cwd As String
Dim length As Long
SetCurrentDirectory "C:\karthik"
cwd = Space(128)
length = GetCurrentDirectory(128, cwd)
cwd = Left(cwd, length)
MsgBox cwd
End
End Sub
'Set Current directory using SetCurrentDirectory API Comments
No comments yet — be the first to post one!
Post a Comment