teFile hStdOut, s, LenB(StrConv(s, vbFromUnicode)), lBytesWritten, ByVal 0&
End Sub
'' 本函数用于对用户输入的数据进行解码
Public Function UrlDecode(ByVal sEncoded As String) As String
Dim pointer As Long, pos As Long
Dim temp As String
If sEncoded = "" Then Exit Function
pointer = 1
Do '' 该循环对系统保留字和汉字进行处理
pos = InStr(pointer, sEncoded, "%")
If pos = 0 Then Exit Do
temp = Chr("&H" & (Mid(sEncoded, pos + 1, 2)))
If Mid(sEncoded, pos + 3, 1) = "%" And (temp <> ":") _
And (temp <> "\") And (temp <> "/") Then
Mid(sEncoded, pos, 2) = Chr("&H" & (Mid(sEncoded, pos + 1, 2)) _
& (Mid(sEncoded, pos + 4, 2)))
sEncoded = Left(sEncoded, pos) & Mid(sEncoded, pos + 6)
pointer = pos + 1
Else
Mid(sEncoded, pos, 1) = temp
sEncoded = Left(sEncoded, pos) & Mid(sEncoded, pos + 3)
pointer = pos + 1
End If
Loop
UrlDecode = sEncoded
End Function
'' 本函数用于对输入的“Name = Value”数据对进行分解
Public Function FenGe(Cstring As String) As String
Dim I As Integer, j As Integer, add As Integer
j = 1
Do While InStr(Cstring, "&") <> 0
I = InStr(Cstring, "&")
StrData(j) = Mid(Mid(Cstring, 1, I - 1), InStr(Mid(Cstring, 1, I - 1), "=") + 1)
j = j + 1
Cstring = Mid(Cstring, I + 1)
Loop
StrData(j) = Mid(Cstring, InStr(Cstring, "=") + 1)
For I = 1 To j '' 该循环用于把字符串内的“+”还原为空格
Do