Search found 20 matches: gethostname

Return to advanced search

Re: Asignar impresora por terminal?

... o MySql) puedes tener una tabla con las terminales instaladas, referenciando a ellas por el nombre del equipo, que logras obtener con la funcion GetHostName() Las alternativas son varias Luego en las impresiones que tienes que dirigir a una impresora determinada, haces lo que bien comenta sysctrl2 ...
by cmsoft
Mon Apr 22, 2024 8:47 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Asignar impresora por terminal?
Replies: 11
Views: 209

Re: GetHostByName( GetHostName() )

Dear Byron, You may ask chatgpt and Google Gemini about it and both offer good advice: chatgpt: Enumerate Network Interfaces: Use the GetAdaptersInfo or GetAdaptersAddresses function to enumerate all network interfaces on your system. These functions provide information about each network adapter, i...
by Antonio Linares
Wed Mar 06, 2024 9:44 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: GetHostByName( GetHostName() )
Replies: 1
Views: 162

GetHostByName( GetHostName() )

I use WSAStartup() ; cIp := GetHostByName( GetHostName() ) ; WSACleanup(), to get the local IP address. However my system has an EtherNet, Hamachi, and 2 VMware showing as adapters. The address returned by the function GetHostByName returns a ...
by byron.hopp
Wed Mar 06, 2024 7:35 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: GetHostByName( GetHostName() )
Replies: 1
Views: 162

Tambien Saber Ip LOCAL

... <WinSock.h> #include <hbapi.h> HB_FUNC( IPLOCAL ) { WSADATA wsa_Data; WSAStartup( 0x101, &wsa_Data ); char szHostName[255]; gethostname(szHostName, 255); struct hostent *host_entry; host_entry = gethostbyname(szHostName); char * szLocalIP; szLocalIP = inet_ntoa (*(struct ...
by Busmatic_wpb
Fri Dec 07, 2018 2:15 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Saber Ip Publico
Replies: 1
Views: 607

Re: Conocer el Numero de IP

... segun leo en el foro en ingles en este link http://forums.fivetechsupport.com/viewtopic.php?f=3&t=4722&start=0&hilit=GetHostName hay que poner antes WsaStartUp()cIP := GetHostByName(GetHostName())  MsgInfo(cIp) Gracias por la observacion
by cmsoft
Fri Apr 22, 2016 1:07 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Conocer el Numero de IP
Replies: 6
Views: 1068

Re: Conocer el Numero de IP

cmsoft

Con
cIP := GetHostByName(GetHostName())

No funciona.

Saludos,

Adhemar
by acuellar
Thu Apr 21, 2016 3:37 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Conocer el Numero de IP
Replies: 6
Views: 1068

Re: Conocer el Numero de IP

cIP := GetHostByName(GetHostName())
Tambien te puede serviro
by cmsoft
Thu Apr 21, 2016 3:09 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Conocer el Numero de IP
Replies: 6
Views: 1068

Re: Detectar parametros de red (IP, GateWay, Mascara de red...)

La funcion GetHostName() te trae el nombre del equipo. La funcion GetHostByName(GetHostName()) te trae la IP del equipo. GetHostByAddress(Ip) obtiene el nombre del equipo que tiene una IP GetServByName( <cServerName> ) –> ...
by cmsoft
Tue Sep 01, 2015 12:17 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Detectar parametros de red (IP, GateWay, Mascara de red...)
Replies: 6
Views: 1421

Compilando updftp.prg MVC 2010

... distinta C:\VC2010\SDK\Include\winsock.h(855) : vea la declaración de 'gethostbyname' C:\VC2010\SDK\Include\winsock2.h(2101) : error C2375: gethostname' : nueva definición; vinculación distinta C:\VC2010\SDK\Include\winsock.h(857) : vea la declaración de 'gethostname' C:\VC2010\SDK\Include\winsock2.h(2121) ...
by nnicanor
Tue Apr 17, 2012 5:19 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Compilando updftp.prg MVC 2010
Replies: 1
Views: 730

Ayuda con socket - Solucionado

... @ 4, 2 BUTTON oBtn3 PROMPT "SendFile" ; ACTION SendFile() SIZE 80, 20 @ 5, 2 BUTTON oBtn4 PROMPT "HostName" ; ACTION MsgInfo( GetHostName() ) SIZE 80, 20 @ 7, 2 BUTTON oBtn5 PROMPT "Close" ; ACTION ( oSocket:End() , oWnd2:End()) SIZE 80, 20 oBtn2:Disable() oBtn3:Disable() ...
by russimicro
Sun Oct 31, 2010 4:28 pm
 
Forum: FiveWin para Pocket PC
Topic: Ayuda con socket - Solucionado
Replies: 0
Views: 646

Re: Se necesita ayuda en el wiki !

... GetFocus() GetFontInfo() GetFrameProc() GetFreeFil() GetFreeSpace() GetFTime() GetGridSize() GetHelpFile() GetHelpTopic() GetHostByName() GetHostName() GethWnd32() GetInstance() GetIP() GetKeyStat() GetKeyToggle() GetLocal() GetMapMode() GetMDIChlP() GetMeaItem() GetMenuState() GetMetaBit() ...
by Cgallegoa
Sun Feb 21, 2010 10:35 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Se necesita ayuda en el wiki !
Replies: 12
Views: 5503

error al compilar winsock de smtp luis

... HARBOUR HB_FUN_GETHOSTNAME( PARAMS ) // () --> cHostName #else CLIPPER GETHOSTNAM( PARAMS ) // E() --> cHostName #endif { BYTE Name[ 255 ]; gethostname( ( char * ) Name, 255 ); _retc( ( char * ) Name ); } //----------------------------------------------------------------------------// #ifdef ...
by MANOLO
Thu Feb 19, 2009 7:20 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: error al compilar winsock de smtp luis
Replies: 2
Views: 855

Jeff,

You must add WsaStartup() before the call to Gethostbyname() and add a WsaCleanup() after the call.

Try this:

Function GetIP()
Local cVar1
WsaStartUp()
cVar1 := GetHostByName( GetHostName() )
WsaCleanUp()
return cVar1

James
by James Bott
Sat Oct 28, 2006 2:34 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: PC IP Address
Replies: 2
Views: 839

PC IP Address

Hi Everybody,

I'm trying to have my program store the end users internal IP Address but I can not seem to get the actual address.

I am using:

GetHostByName( GetHostName() )

But it always returns 0.0.0.0

What am I doing wrong?

Thanks,
Jeff
by Jeff Barnes
Fri Oct 27, 2006 10:56 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: PC IP Address
Replies: 2
Views: 839

Sockets

Hi,

One thing I found is that when the connection doesn't connect, the connect event still fires, but oSocket:ClientIP() returns "0.0.0.0"

oSocket:cIPAddr is always your own address, as set by

::cIPAddr = GetHostByName( GetHostName() )

in the new method.

HTH's

Alex
by AlexSchaft
Wed Aug 30, 2006 3:45 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Tsocket
Replies: 10
Views: 3221
Next

Return to advanced search