How to use protocol ethernet using visual basic 6?
Hi, I am looking for some protocol for   ethernet using Visual Basic 6, so if someone has experience with that, please tell me how to start with this?
Hi, I am looking for some protocol for   ethernet using Visual Basic 6, so if someone has experience with that, please tell me how to start with this?
If I recall correctly, RSLinx Pro can work as an interface for DDE.
Hello Adamswhitley,
Make use of the bundled Winsock control. Where PC #1 will possess an IP address and PC #2 will possess another IP Address. In this case, one PC could play the role of a server and the other one could be the client.
Run a Google search for client and server sample source codes. Perhaps the link given below will give you an idea exactly where to get started.
http://www.planet-source-code.com/
Hope this will help you clear the doubt.Â
Â
Network communication with Ethernet device can be achieved using a TCP/IP "SOCKET" connection. A socket is a logical channel which specifies the two end points of the connection. Each Ethernet device is given a unique IP Address and port number. The program must make a connection with the device using the IP and port number assigned to it, once it is done the data can be transferred to target device and from the target device as a data stream.
In VB WINSOCK control can be selected for the project->components and can be added to a form like any other control, it's an easy way to establish a socket connection with the target network device.
The Winsock control can be used either for TCP or UDP communications by default its TCP
The IP address and port no of the of the target device are stored in the "ReportHost" and "Remote Port" properties either on runtime or design time, connect method used to establish the connection.
For example
mywinsock.Protocol = abc
mywinsock.RemoteHost="192.168.1.21"
mywinsock.Connect
Private mywinsock_connect()
Msgbox"Connection established"
end sub
"connect" event triggers when connection established.
Â