howardsd
asked on
runtime error '453' Can't find DLL entry point GetCurrentDirectory in kernel32
i'm attempting to make a GetCurrentDirectory function call in my form_load routine but get the error stated in the subject
any help would be appreciated!!!
the following is my code
Private Declare Function GetCurrentDirectory Lib "kernel32" ( _
ByVal nBufferLength As Long, _
ByVal lpBuffer As String) As Long
Public strPath as String
Private Sub Form_Load()
Dim lngTemp As Long
strPath = String(255, 0)
lngTemp = GetCurrentDirectory(255, strPath)
MsgBox strPath
End Sub
any help would be appreciated!!!
the following is my code
Private Declare Function GetCurrentDirectory Lib "kernel32" ( _
ByVal nBufferLength As Long, _
ByVal lpBuffer As String) As Long
Public strPath as String
Private Sub Form_Load()
Dim lngTemp As Long
strPath = String(255, 0)
lngTemp = GetCurrentDirectory(255, strPath)
MsgBox strPath
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
u beat me by 1 minute!
:)
Glad that you found it!
Glad that you found it!
ASKER
Private Declare Function GetCurrentDirectory Lib "kernel32" Alias "GetCurrentDirectoryA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long