I am using multiple winsocks in my app.

All is good until I unload my winsocks like this:

for i = 1 to 50
unload winsock(i)
next i

while it is unloading, I frequently get an error like:

Memory xxxxxx referenced memory at xxxxxxx. Memory cannot be "Read".




I found out that SP4 for Visual Studio should fix this problem. I installed the Service Pack and this problem is still popping up. Can anyone help me get rid of this stupid error!