Announcement

Collapse
No announcement yet.

Convert String IP Address (###.###.###.###) into a Long, for use with UDP functions.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lance Edmonds
    replied
    I'm going from memory here (since I'm not at my DEV PC), but does not HOST ADDR do this is you give it a string as a dotted IP address?

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Guest
    Guest replied
    Include wsock32.inc in your app
    Code:
    Function StringToIp( ip As Asciiz )  As Long
        Function = inet_addr( ip )
    End Function

    Leave a comment:


  • Convert String IP Address (###.###.###.###) into a Long, for use with UDP functions.

    Well the subject basically states my question, how do I convert a string IP address (eg: 127.0.0.1) into a Long, since the PowerBasic UDP commands require the IP address to be in the long variable format. Help!

    ------------------
Working...
X