I presume that the function getDesktopPath returns a string ending with a Chr(0) character (as many API calls do), which marks the end of a string for most controls etc - in which case it is not a bug at all, just 'bad' code.
If you show us the code for getDesktopPath, we can help you correct it.
Public Declare Function SHGetSpecialFolderPath Lib "shell32.dll" Alias "SHGetSpecialFolderPathA" (ByVal hwnd As Long, ByVal pszPath As String, ByVal csidl As Long, ByVal fCreate As Long) As Long
Public Function getDesktopPath() As String
Dim sPath As String
sPath = Space$(255)
SHGetSpecialFolderPath hwnd, sPath, 0, 0
getDesktopPath = sPath
End Function