Power Builder - direccion ip con windows 7

 
Vista:
sin imagen de perfil

direccion ip con windows 7

Publicado por solindeveloper (30 intervenciones) el 02/09/2010 16:47:55
Sres foristas he migrado la version del PB de 9 a 11 y hasta ahi todo ok.
Luego de los testeos de rigor me doy con la sorpresa que el sistema actualmente en windows 7 no obtiene la direccion ip de la Pc como lo hacia con un XP normal

Espero me puedan dar un alcance que particularidad tiene el Windows 7 o que nuevas funciones se debe utilizar para obtener correctamente el ip:

Este es mi script:
Tengo una funcion gf_obtener_ip que me hace todo el trabajo


String ls_ipaddress, ls_hostname
Blob{4} lb_hostadress
Integer li_version, li_rc
str_wsadata lstr_wsadata1

ls_hostname = Space(128)
li_version = 257

If WSAStartup(li_version, lstr_wsadata1) = 0 Then
If GetHostName(ls_hostname, Len(ls_hostname)) < 0 Then
li_rc = WSAGetLastError()
Else
GetHost(ls_hostname, lb_hostadress)
ls_ipaddress = String(Asc(String(BlobMid(lb_hostadress, 1, 1)))) + "."
ls_ipaddress += String(Asc(String(BlobMid(lb_hostadress, 2, 1)))) + "."
ls_ipaddress += String(Asc(String(BlobMid(lb_hostadress, 3, 1)))) + "."
ls_ipaddress += String(Asc(String(BlobMid(lb_hostadress, 4, 1))))

li_rc = 0
End If
Else
li_rc = WSAGetLastError()
End If

WSACleanup()

//Return li_rc
Return ls_ipaddress


Ademas tengo en mi objeto aplicacion en Global external functions lo siguiente:

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"

Function int GetWindowTextA(long handle, ref string wintext, int length) Library "USER32.DLL"

Agradezco de antemano sus sugerencias

Saludos desde Peru
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:direccion ip con windows 7

Publicado por jORGEe (4 intervenciones) el 13/09/2010 21:43:07
Win 7 es S.O de 64 bits. deberías tener esto en cuenta. estas usando USER32.DLL
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar