Browse Source

* add boolean that can be changed to avoid shutting down winsock. This can trouble other DLLs. Mantis #22597

git-svn-id: trunk@24446 -
marco 12 years ago
parent
commit
c9dce154fd
1 changed files with 6 additions and 1 deletions
  1. 6 1
      rtl/win/sockets.pp

+ 6 - 1
rtl/win/sockets.pp

@@ -53,6 +53,10 @@ const
 {$i socketsh.inc}
 {$i fpwinsockh.inc}
 
+// finalizing Winsock2 stack might upset other DLLS. Mantis #22597
+var 
+  NoWinsockCleanupCall : Boolean = false;
+
 Implementation
 
 { Include filerec and textrec structures }
@@ -276,5 +280,6 @@ var
 initialization
   WSAStartUp(WINSOCK_VERSION,wsadata);
 finalization
-  WSACleanUp;
+  If Not NoWinsockCleanupCall Then 
+   WSACleanUp;
 end.