写一个ftp客户端,使用inet控件,在上传模块那里,出现问题。
如果文件的路径,或者文件名本身含有空格,就不能上传,请问应该如何解决?

解决方案 »

  1.   

    Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long
    Private Sub Command1_Click()
        Dim sshortname As String * 255
        Dim pos As Integer
        Dim llongname As String
        llongname = "C:\Documents and Settings"
        pos = GetShortPathName(llongname, sshortname, Len(sshortname))
        Print LCase(Left(sshortname, pos))
    End Sub