Search code examples
vb6ip-addresswinsock

Change Winsock.LocalIP on run time


I have a problem with the Winsock control. The problem is that I can't set the right IP for the localIp property. It becomes relevant when I have some LAN adapters (logical like vmware or physical). I have a way to know what is the right ip.

Is there any way to change it?


Solution

  • Bind Method

    Winsock1.Bind LocalIP:="127.0.0.1"