mac address
-
- Posts: 3
- Joined: Tue Oct 11, 2005 2:10 am
- Location: India
- Contact:
mac address
Can any please help me how to find mac address of the PC ?
Thanks in advance
NageswaraRao
Thanks in advance
NageswaraRao
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
-
- Posts: 3
- Joined: Tue Oct 11, 2005 2:10 am
- Location: India
- Contact:
mac address
Thanks Mr. Antonio.
But I am getting unlinked external "GetAdapetersInfo" referenced by function "NETCRDID"
I am using xHarbour with FWH.
Can you help me with this please?
Regards
Nageswararao
But I am getting unlinked external "GetAdapetersInfo" referenced by function "NETCRDID"
I am using xHarbour with FWH.
Can you help me with this please?
Regards
Nageswararao
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
GetNetCardID
Add IPHLPAPI.LIB from bcc55 into your script if your are using bcc
-
- Posts: 3
- Joined: Tue Oct 11, 2005 2:10 am
- Location: India
- Contact:
mac address
I am using xharbour with bcc55. not the commercial version. i included the lib iphlpapi.lib as advised by srrao and now its working fine. thanks mr. antonio and mr. sanjay
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
GetNetCardID under xhb Commercial
Hi,
I'm getting a unresolved external __chkstk when I try to use this
I'm getting a unresolved external __chkstk when I try to use this
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
GetNetCardID
If I add that dummy function, GetNetCardID kills my app.
Will ask on xhb newsgroup
Alex
Will ask on xhb newsgroup
Alex
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- AlexSchaft
- Posts: 172
- Joined: Fri Oct 07, 2005 1:29 pm
- Location: Edenvale, Gauteng, South Africa
No luck
Busy trying to get following code to work. It compiles. I just need to figure out how to return an array of adapter names and addresses
Busy trying to get following code to work. It compiles. I just need to figure out how to return an array of adapter names and addresses
Code: Select all
#include <iphlpapi.h>
// Fetches the MAC address and prints it
static void GetMACaddress(void)
{
IP_ADAPTER_INFO AdapterInfo[16]; // Allocate information
// for up to 16 NICs
DWORD dwBufLen = sizeof(AdapterInfo); // Save memory size of buffer
DWORD dwStatus = GetAdaptersInfo( // Call GetAdapterInfo
AdapterInfo, // [out] buffer to receive data
&dwBufLen); // [in] size of receive data buffer
// assert(dwStatus == ERROR_SUCCESS); // Verify return value is
// valid, no buffer overflow
PIP_ADAPTER_INFO pAdapterInfo = AdapterInfo; // Contains pointer to
// current adapter info
do {
// PrintMACaddress(pAdapterInfo->Address); // Print MAC address
pAdapterInfo = pAdapterInfo->Next; // Progress through
// linked list
}
while(pAdapterInfo); // Terminate if last adapter
}