Detect MAC address in C++
-
Hello.. Is there anyone here have the code for detecting MAC address in windows XP in C++. Im using Visual C++ 6.0. Thank you
See GetAdaptersInfo[^] from the IP Helper API[^].
-- gleat http://blogorama.nerdworks.in[^] --
-
See GetAdaptersInfo[^] from the IP Helper API[^].
-- gleat http://blogorama.nerdworks.in[^] --
GetAdapterInfo requires the iphlpapi.lib/h. It seems that i dont have that lib and header file. I tried to download it separately and i try run the sample program from msdn but it still have all these syntax error which i couldnt understand why it occured (eg: missing ; but i see that there is no problem with the syntax). Currently im using Visual C++ 6.0. Must I upgrade the latest SDK and install the latest Visual C++. The latest is Visual C++ 2005 right? Since im still a student doing my final year project, i found that im kinda slow in this. What are other steps that i could do to upgrade my programming kit and also, is there any code that can provide me a full code to detect MAC address?
-
GetAdapterInfo requires the iphlpapi.lib/h. It seems that i dont have that lib and header file. I tried to download it separately and i try run the sample program from msdn but it still have all these syntax error which i couldnt understand why it occured (eg: missing ; but i see that there is no problem with the syntax). Currently im using Visual C++ 6.0. Must I upgrade the latest SDK and install the latest Visual C++. The latest is Visual C++ 2005 right? Since im still a student doing my final year project, i found that im kinda slow in this. What are other steps that i could do to upgrade my programming kit and also, is there any code that can provide me a full code to detect MAC address?
Go to the very FIRST Syntax error, and see how it occurred. There may be a Header Missing, but often you can write your own to get out of a bind. The most common reason with downloaded stuff like that is, incorrect or missing manifest constants, or esoteric looking typedeffed names, ultimately resolving to an int of the correct size. A bit of experimentation is both educational, and often gives less headaches than upgrading the entire SDK. Regards, :)
Bram van Kampen
-
GetAdapterInfo requires the iphlpapi.lib/h. It seems that i dont have that lib and header file. I tried to download it separately and i try run the sample program from msdn but it still have all these syntax error which i couldnt understand why it occured (eg: missing ; but i see that there is no problem with the syntax). Currently im using Visual C++ 6.0. Must I upgrade the latest SDK and install the latest Visual C++. The latest is Visual C++ 2005 right? Since im still a student doing my final year project, i found that im kinda slow in this. What are other steps that i could do to upgrade my programming kit and also, is there any code that can provide me a full code to detect MAC address?
No you do not need to upgrade from VC++ 6.0 just to use the IP Helper API. And yes the latest Visual C++ production release from Microsoft as of date is Visual C++ 2005. As for the syntax errors you should probably just listen to Bram van Kampen!
-- gleat http://blogorama.nerdworks.in[^] --
-
No you do not need to upgrade from VC++ 6.0 just to use the IP Helper API. And yes the latest Visual C++ production release from Microsoft as of date is Visual C++ 2005. As for the syntax errors you should probably just listen to Bram van Kampen!
-- gleat http://blogorama.nerdworks.in[^] --