Ken Maynard
Ken Maynard

Reputation: 55

Delphi 7 TComPort does not open port

We have a Viewsonic LS740HD projector connected to a Windows 10 PC with a USB serial adaptor (prolific I think). This produces a port visible in device manager, and works with the GUI in the supplied program (vController). I want to make the control automatic. I am using Delphi 7 with TComPort on my development system creating a console app. The dev PC is remote from the target. The program fails on the target at the first hurdle. It fails to connect to the port, crashing with

Exception EComPort in module projector.exe at 005098d
unable to open com port (Error: 2)

I only copied the EXE file. Is there a DLL I should also have? Or is it something else? I had to download a driver for the USB gadget which may not be the right one - on the other hand vController has no problem with it.

Upvotes: 0

Views: 168

Answers (1)

Ken Maynard
Ken Maynard

Reputation: 55

The documentation says:

Port values have the following syntax: 'COMportnumber' or 'portnumber'

I used 'portnumber' but apparently only 'COMportnumber' works. It connects now.

Upvotes: 1

Related Questions