VB6 MSComm Troubleshooting

MSComm failures are often caused by a mismatch between control properties, event thresholds and the device's real timing rather than a defective port.

Capture the effective control state

  1. Verify CommPort exists and is not already open elsewhere.
  2. Record Settings, handshaking and control-line assumptions before PortOpen=True.
  3. Use InputMode appropriate to text or binary data; binary payloads should not pass through string conversion accidentally.
  4. Understand whether InputLen=0 drains the current receive buffer or a fixed-length read is required.
  5. Set RThreshold and SThreshold deliberately and log every OnComm event.
  6. Clear stale buffers only at a defined protocol boundary.

Timing and deployment traps

No receive eventThreshold, event handling, port selection, flow control or no incoming bytes.
Truncated frameReading on the first event without accumulating until a complete frame.
Corrupt binary dataText mode, encoding conversion or delimiter assumptions.
Works on old PCChanged COM number, adapter driver latency or control-line behavior.

Build a receive buffer that separates byte arrival from message framing. Record timestamps and raw bytes so application parsing can be tested without the device.

The broader VB6 serial guide covers architecture; use framing-error diagnosis, Prolific compatibility and the VB6 pillar for adjacent layers.

Describe your legacy system or problem

Share what still works, what failed, and what must be preserved.

EMAIL BOGLAR.NET