title: VB6 MSComm, ports above 127 return 8002
body: <p>I have a simple function that checks if we have open ports on the system, I would test ports from 1 to 256. For some odd reason when I have device at port over 127 system returns error 8002. This is very odd because when I use a different C++ application to check connection device is found and is available for reading.</p>
  
  <p>This issue is related to the MSComm32.OCX, which has a limit on how many ports are available. I need to increase this limit to 256. I found a list of instruction below, but I wasn't able to find "3D 10 00" in the MSComm32.OCX file, this was on Windows 8 PC. However, on Windows XP MSComm32.OCX did contain "3D 10 00", i quickly found the string and added a new byte "FF" and deleted byte "10" using <a href="http://mh-nexus.de/en/hxd/" rel="nofollow">http://mh-nexus.de/en/hxd/</a> and saved it as a new file.</p>
  
  <pre><code>First you copy the file MSCOMM32.OCX to a safe place.
  1. Obtain a HEX editor.
  2. Open de file MSCOMM32.OCX
  3. Find the string "3D 10 00"
  4. There should be only one. This string is unique.
  5. Change the string to "3D FF 00"
  6. Save the file.
  </code></pre>