We have an application that reads data string coming from various serial ports and is written in VB6.

We use the API method of reading the data

CreateFile(sPort, ..... where sPort is the appropriate Serial Port e.g. "\\.\Com60" to read Comm 60.

This has worked a treat for serveral years. One customer has now replaced the serial interfacing with a Serial to Internet converter and is sending the data with a UDP broadcast. E.g the data is send from the Host PC (named "TestDesktop") and on Port 5000.

Can we open this port using CreateFile and if so what do we use in the sPort variable. Is it "TestDesktop:5000" ? or do we need to use Winsock to listen to this port.

Thanks in advance

John Kelly

Have a look at THIS link, which is more about the CreateFile API, or THIS link which contains some code samples and error solving.

I would however settle for the Winsock control to listen for requests port 5000 and act accordingly if request was received.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.