Re: Convert DWORD Value to dotted IP Address by Daryl
Daryl
Wed Sep 08 15:00:39 CDT 2004
Thanks!
"Tom Lavedas" <tlavedas@hotmail.remove.com> wrote in message
news:4DAF72DC-79D9-4622-A099-400D23CD5F3A@microsoft.com...
> Maybe something like this ...
>
> wsh.echo DWordToIP(167788830)
>
> Function DWordToIP(DWord)
> strhex = Right("00000000" & hex(DWord), 8)
> strIP = CInt("&H" & Left(strHEX, 2))
> for n = 3 to 7 step 2
> strIP = strIP & "." & CInt("&H" & Mid(strHEX, n, 2))
> Next
> DWordToIP = strIP
> End Function
>
> Tom Lavedas
> ============
>
> "Daryl" wrote:
>
> > does anybody have any code to convert a dword value to a dotted ip
> > address....
> >
> > I know that DWORD Value 167788830 converts to 10.0.65.30 but i have no
idea
> > how to do it
> >
> >
> >