Thanks
GOOD LUCK........KISHORE
[Structure]
str_wsadata
unsignedinteger version
unsignedinteger highversion
character description[257]
character systemstatus[129]
nsignedinteger maxsockets
unsignedinteger maxupddg
string vendorinfo
[External function]
function int WSAStartup (uint UIVerionrequested, ref str_wsadata lpWSAdata)
library "wsock32.DLL"
function int WSACleanup() library "wsock32.DLL"
function int WSAGetLastError() library "wsock32.DLL"
function int gethostname(ref string name, int namelen) library
"wsock32.DLL"
function string GetHost(string lpszhost,ref blob lpszaddress) library
"pbws32.dll"
[Powerscript]
String ls_ip, ls_host
Blob{4} lb_host
Integer li_version, li_rc
str_wsadata lstr_wsadata
ls_host = Space(128)
li_version = 257
If WSAStartup(li_version, lstr_wsadata) = 0 Then
If GetHostName(ls_host, Len(ls_host)) < 0 Then
li_rc = WSAGetLastError()
Else
GetHost(ls_host, lb_host)
ls_ip = String(Asc(String(BlobMid(lb_host, 1, 1)))) + "."
ls_ip += String(Asc(String(BlobMid(lb_host, 2, 1)))) + "."
ls_ip += String(Asc(String(BlobMid(lb_host, 3, 1)))) + "."
ls_ip += String(Asc(String(BlobMid(lb_host, 4, 1))))
li_rc = 0
End If
MessageBox("My IP", ls_ip)
Else
li_rc = WSAGetLastError()
End If
WSACleanup()
Thanks
Thanks
> Check out this link below