Experiencing 'Address in use' problems when application runs in Windows 7
I am using MSWINSCK.OCX (Winsock Control) for a simple chat feature within my application. Works as expected in Windows XP and previous versions of Windows.
Installed application on Windows 7 (32 and 64 bit) When the Winsock.Close is issued and the Winsock.State = sckClosed, I am not able to set Winsock.Listen without getting an error (Address in use).
I have put a counter within the Error process which performs a RESUME if the count is less then 1000. It appears that even though the Winsock Control is in the CLOSED state, the Address (local port number I guess) has not been released. Many tests with this shows that no matter what reason we are doing the CLOSE, There always seems to be a 300 to 400 cycle delay before the port is available.