
why isn't this api code working?
'declaration
Private Declare Function PathCompactPath _
Lib "shlwapi" Alias "PathCompactPathA" ( _
ByVal hDC As IntPtr, _
ByVal lpszPath As String, _
ByVal dx As Integer) As Integer
'code
Dim strFilePath as String = "C:\Program Files\Some
Dir\Some Dir\Etc\Some File.txt"
PathCompactPath(Me.Handle, strFilePath, 250)
sbMain.Panels(0).Text = strFilePath
For some reason, no matter what I change the destination
size to, the output string is always "...\Some File.txt".
I know the string should change depending on the size. For
example, "C:\Program Files\...\Etc\Some File.txt"
What am I doing wrong?
thanks in advance,
Todd