<div>I&#39;m trying to make programs that need a socks proxy to work on wine.</div><div><br></div><div>They work with freecaps or similar winsock patches as long as they don&#39;t use wininet or other indirect winsocks APIs to make their stuff, if they use wininet those patches could not work since wininet bypasses winsocks and use linux sockets directly.</div>
<div><br></div>In the head of the wininet.dll sources there is this comment:<div><br></div><div><div>/* FIXME!!!!!!</div><div> *    This should use winsock - To use winsock the functions will have to change a bit</div><div>
 *        as they are designed for unix sockets.</div><div> *    SSL stuff should use crypt32.dll</div><div> */</div><div><br></div><div>I tried to change netconnection.c to use winsock functions WSAConnect, WSASend &amp; WSARecv since WS_send, WS_recv and WS_connect are not exposed by ws2_32 instead of direct linux socket functions (connect/send/recv), but I had no way to check the problems with unix sockets vs inet sockets cause the library crashes wine before hitting anything related with my CODE patches.</div>
<div><br></div><div>It crashes simply because I&#39;ve added in Makefile.in ws2_32 module IMPORTS, doing so what I&#39;ve observed is that standard linux sockets calls are &quot;wrapped&quot; and points now to NULL (because ws2_32 is not loaded?).</div>
<div><br></div><div>In this specific case &quot;getaddrinfo&quot; is NULL and HTTP_ResolveName crashes when calling it.</div><div><br></div>Anyone can suggest me the correct approach to implement this? I have to load manually ws2_32 in the wininet initialization?</div>
<div><br></div><div>-- <br>Bye,<br> Gabry<br><br><br>
</div>