title: How to compile Winsock Control 6.0 on VB6 in Windows 10?
body: <p>When trying to compile in the &quot;Winsock Control&quot; component on Windows 10, I get this error:</p>
  <blockquote>
  <p>mswinsck.ocx could not be loaded</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/yGQif.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yGQif.png" alt="image" /></a></p>
  <p>Notably, I have installed VB6 SP6, and with SP6 it works great on Windows 8.1 and Windows 7, but it won't compile on Windows 10.</p>
  <p>Also notably, the compiled <code>.exe</code>, when compiled from Win7/8, has no problem loading <code>ws2_32.dll</code>. It's just the compiling step that doesn't work on Win10.</p>
  <p>Running Dependency Walker, <code>depends.exe</code> suggests <code>mswinsck.ocx</code> can't be loaded because it's depending on <code>API-MS-WIN-CORE-SYNCH-L1-2-0.DLL</code> and <code>API-MS-WIN-CORE-PROFILE-L1-1-0.DLL</code> and <code>API-MS-WIN-CORE-PROCESSTHREADS-L1-1-0.DLL</code> and a bunch of other DLLs with similar names (I think these DLLs have something to do with SysWOW64), which can't be found:</p>
  <p><a href="https://i.stack.imgur.com/Be0QZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Be0QZ.png" alt="image" /></a></p>
  <p>Does anyone know how to compile in &quot;Winsock Control&quot; in VB6 on Win10?</p>
  <p>(Also notably, it seems the MSFlexGrid component is un-compilable on Win10 in a similar fashion, but this question is about the WinSock control, not MSFlexGrid).</p>
  <p><strong>EDIT:</strong> additional info: I have installed &quot;VB6 Service Pack 6&quot;, VB version is &quot;Version 9782 VBA retail 6.0.9782&quot;, and the version on the <code>mswinsck.ocx</code> file itself is <code>6.1.97.82</code> (and thanks to the comments, I know a newer one exists: <code>6.1.98.16</code>)</p>