FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour MAC address
Posts: 593
Joined: Sat May 12, 2007 11:47 AM
MAC address
Posted: Sat Mar 02, 2013 03:13 PM

Buen d铆a,

驴Hay alguna funci贸n o forma para conocer el MAC address de una pc desde una app?

Gracias.

Rolando :D

Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: MAC address
Posted: Sat Mar 02, 2013 03:56 PM

Si

mira el ejemplo getmac.prg de los samples

Posts: 593
Joined: Sat May 12, 2007 11:47 AM
Re: MAC address
Posted: Sat Mar 02, 2013 04:09 PM

Gracias Daniel,

驴En donde encuentro la funci贸n "GetAdaptersInfo" necesaria para compilar?

Rolando :D

Posts: 593
Joined: Sat May 12, 2007 11:47 AM
Re: MAC address
Posted: Sat Mar 02, 2013 04:25 PM

Ya encontr茅 la lib.

Funciona perfecto.

Gracias.

Rolando :D

Posts: 654
Joined: Mon May 29, 2006 03:14 PM
Re: MAC address
Posted: Sat Mar 02, 2013 08:03 PM
rolando wrote:Ya encontr茅 la lib.
Y cual es esa libreria.
Gracias.
Mi abuelo dec铆a: Los aviones vuelan porque Dios quiere, y los helic贸pteros ni Dios sabe porque vuelan.

FWH 16.02, xHarbour 1.2.3, Harbour 3.2.0, WorkShop 4.5, AJ Make 0.30, Borlan BCC 7.00, VisualStudio 2013
Posts: 593
Joined: Sat May 12, 2007 11:47 AM
Re: MAC address
Posted: Sat Mar 02, 2013 09:23 PM

Hola JM,

La funci贸n "GetAdaptersInfo" est谩 en la "IPHLPAPI.LIB" y, esta lib, est谩 en la carpeta "PSDK" del BCC582.

Saludos.

Rolando :D

Posts: 654
Joined: Mon May 29, 2006 03:14 PM
Re: MAC address
Posted: Sun Mar 03, 2013 03:08 PM
rolando wrote:La funci贸n "GetAdaptersInfo" est谩 en la "IPHLPAPI.LIB" y, esta lib, est谩 en la carpeta "PSDK" del BCC582.
Gracias, muchas gracias.

Algunos campos se puden intuir lo que son 驴 pero cuales son los campos ?
Code (fw): Select all Collapse
{D510A198-53D6-4F6E-A3E5-D83CCFD25081}
Intel(R) 82579LM Gigabit Network Connection - Minipuerto del administrador de paquetes
3C-FF-66-CC-2E-D0
2
6
VERDADERO
192.168.1.254
192.168.1.1
FALSO
0.0.0.0
0.0.0.0
Mi abuelo dec铆a: Los aviones vuelan porque Dios quiere, y los helic贸pteros ni Dios sabe porque vuelan.

FWH 16.02, xHarbour 1.2.3, Harbour 3.2.0, WorkShop 4.5, AJ Make 0.30, Borlan BCC 7.00, VisualStudio 2013
Posts: 654
Joined: Mon May 29, 2006 03:14 PM
Re: MAC address
Posted: Sun Mar 03, 2013 03:15 PM
Veo que en los DEFINES esta explicado:
Code (fw): Select all Collapse
#define ADP_NAME 聽 聽 聽 聽1 聽//An ANSI character string of the name of the adapter. (STRING)
#define ADP_DESCRIPTION 2 聽//An ANSI character string that contains the description 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽//of the adapter. (STRING)
#define ADP_ADDRESS 聽 聽 3 聽//The hardware address for the adapter (STRING)
#define ADP_INDEX 聽 聽 聽 4 聽//The adapter index. 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽//The adapter index may change when an adapter is disabled 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽//and then enabled, or under other circumstances, 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽//and should not be considered persistent.(NUMERIC)
#define ADP_TYPE 聽 聽 聽 聽5 聽//The adapter type. see define list type (bellow) (NUMERIC)
#define ADP_DHCPENABLED 6 聽//An option value that specifies whether the dynamic host 
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽//configuration protocol (DHCP) is enabled for this adapter.(LOGICAL)
#define ADP_ADDRESSLIST 7 聽//The list of IPv4 addresses associated with this adapter(STRING)
#define ADP_GATEWAY 聽 聽 8 聽//The IPv4 address of the gateway for this adapter (STRING)
#define ADP_DHCPSERVER 聽9 聽//The IPv4 address of the DHCP server for this adapter represented(STRING)
#define ADP_HAVEWINS 聽 聽10 //An option value that specifies whether this adapter uses (LOGICAL)
聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽//the Windows Internet Name Service (WINS).(LOGICAL)
#define ADP_PRIMARY 聽 聽 11 //the IPv4 address of the primary WINS server
#define ADP_SECUNDARY 聽 12 //The IPv4 address of the secondary WINS server

Sacado del tema New Function GetNetCardInfo http://forums.fivetechsupport.com/viewtopic.php?f=3&t=21651
Mi abuelo dec铆a: Los aviones vuelan porque Dios quiere, y los helic贸pteros ni Dios sabe porque vuelan.

FWH 16.02, xHarbour 1.2.3, Harbour 3.2.0, WorkShop 4.5, AJ Make 0.30, Borlan BCC 7.00, VisualStudio 2013

Continue the discussion