kernel32 GetFullPathName() pointer access from Visual Basic !!!
It seems that a through search can find no previous approaches to the problem that recognize the pointer as being a number. I've dummy'd in a set of lines that make use of the local variable static attribute. First make sure that the declaration is for a number not a string:
Private Declare Function GetFullPathName Lib "kernel32" Alias "GetFullPathNameA" (ByVal lpszPathName As String, ByVal cchBuffer As Long, ByVal lpszLongPath As String, ByRef lpszLongName As Long) As Long
Then set up a function as I done with this Class Get Property:
Public Property Get strFileName(strPathName As String) As String ' extract the file name from the path
Dim lngRetVal As Long, lngLen As Long, strReturnPathName As String, lngptrReturnFileName As Long
Dim lngptrHolder As Long
'Set up buffer area for API function call return
strReturnPathName = Space(255)
lngptrReturnFileName = -1 'start with a non-null
lngLen = Len(strReturnPathName)
'Call the kernel32 function
lngRetVal = GetFullPathName("c:\a", lngLen, strReturnPathName, lngptrReturnFileName)
lngptrHolder = strReturnFileName
lngRetVal = GetFullPathName(strPathName, lngLen, strReturnPathName, lngptrReturnFileName)
'Strip away unwanted characters
strFileName = Right(left(strReturnPathName, lngRetVal), lngRetVal - (strReturnFileName - holder) - 3) 'the three is a remnant for the start of the fictious file "a" in the drive root container
End Property
Ist das guten oder what?

