Hello everyone

I have a function to check if a file on ftp server exists, here it is:
Code:
Public Function RemoteExists(strFile As String) As Boolean
Dim hSearch As Long
Dim FData As WIN32_FIND_DATA

If strFile = "" Then Exit Function
hSearch = FtpFindFirstFile(hConnection, strFile, FData, 0, 0) 'The hConnection is the handle of a ftp session (this code is a part of a class)
If hSearch <> 0 Then
    InternetCloseHandle hSearch
    RemoteExists = True
End If
End Function
It works, it check if there is a file or folder in the current FTP directory.
My problem is that when I call this function many times the computer slows down.
For example:
Code:
Dim x as Integer
For x=0 To 100
    RemoteExists "abc" & x
Next x
After 20-40 calls, all the computer is very slow. When this loop finishes and I want to call others wininet functions like FtpGetCurrentDirectory they also slows down my computer. But when I shut down and open the FTP session again the function executes as fast as before.
Can you tell me what is happening???