ref: http://www.codeguru.com/cpp/i-n/network/networkinformation/article.php/c5451/Three-ways-to-get-your-MAC-address.htm
Note: this function works for windows 2000/xp or above only... and if there are more than one network cards, this function only get the first one... for example:, if vmare workstation exists, this function will return a mac address for vmnet8 in my machine..
use GetAdaptersInfo instead to retrieve all nic info
#include <string>
#include <windows.h>
#include "boost/format.hpp"
using namespace std;
using boost::format;
using boost::io::str;
string getMac()
{
unsigned char MACData[6];
UUID uuid;
UuidCreateSequential(&uuid);
for(int i = 2; i<8; ++i)
{
MACData[i-2] = uuid.Data4[i];
}
format f("%02X-%02X-%02X-%02X-%02X-%02X");
f % (int)MACData[0] % (int)MACData[1] %(int)MACData[2] %(int)MACData[3] %(int)MACData[4] %(int)MACData[5];
return f.str();
}
link Rpcrt4.lib...
分享到:
相关推荐
这篇论文标题为《BATCHENSEMBLE: AN ALTERNATIVE APPROACH TO EFFICIENT ENSEMBLE AND LIFELONG LEARNING》,作者Yeming Wen,Dustin Tran和Jimmy Ba,发表于ICLR 2020会议。论文提出了BatchEnsemble这一新的集成...
文献“ORB: An efficient alternative to SIFT or SURF”深入探讨了ORB的原理、实现细节以及与其他方法的比较,是理解ORB特性的宝贵资源。通过阅读这篇PDF文献,你可以更深入地了解ORB如何在保持高性能的同时,实现...
### ORB:一种高效替代SIFT或SURF的图像匹配算法 #### 摘要与背景 ORB(Oriented FAST and Rotated BRIEF)作为一种新型的图像匹配算法,在性能上显著超越了传统的SURF(Speeded Up Robust Features)和SIFT...
With recent advances in the Python ecosystem, Python has become a popular language for scientific computing, offering a powerful environment for statistical data analysis and an interesting ...
标题中的"Alternative to Microsoft’s (tm) Common Dialog control"指的是非微软官方提供的一个通用对话框控件替代方案。在Windows编程中,微软的通用对话框控件(Common Dialog Control)通常用于实现用户与应用...
The "workclock": An alternative to token economies in the management of classroom behaviors THE “WORKCLOCK”: AN ALTERNATIVE TO TOKEN ECONOMIES I N THE MANAGEMENT O F CLASSROOM BEHAVIORS’ ...
An alternative approach to the delivery of school psychological services AN ALTERNATIVE APPROACH TO THE DELIVERY OF SCHOOL PSYCHOLOGICAL SERVICES LONNY W. MORROW Northeast Missouri State ...
In this paper,we propose an alternative re-sampling approach to dealwith imbalance datasets. We demonstrate this approach with a concrete implementation and it has shown promising results when ...
Letters being stacked to create even bigger letters, letting you add banners in plaintext areas like Reddit’s comments. If you’d like to make your own such banners, you need to know the right ...
An alternative way to evaluate the fit is to use a feed-forward neural network that takes several frames of coefficients as input and produces posterior probabilities over HMM states as output. Deep ...
特征匹配是计算机视觉问题的基石,比如物体识别或从运动中重建结构。当前的方法依赖于高成本的描述符进行检测和匹配。在本文中,我们提出了一种基于BRIEF的非常快速的二进制描述符,称为ORB(Oriented FAST and ...
NOTE: Because this edition of Windows uses a patched "winlogon.exe" in order to remove the "oembios.bin" file, you really should not update Windows anyway, in case "winlogon.exe" gets replaced by an ...
Psychological reports: An alternative to traditional methodology PSYCHOLOGICAL REPORTS: AN ALTERNATIVE TO TRADITIONAL METHODOLOGY WILLIAM M. ERWIN AND THOMAS M. CANNON, JR. West Texas State ...
Mule is the most widely used open source ESB-with millions of downloads-providing an alternative to expensive commercial options. Mule in Action is acomprehensive tutorial designed for working Java ...
Here, we demonstrate that lowerature solution-processed nanocrystalline SnO2can be an excellent alternative ETL material for efficient perovskite solar cells. Our best-performing planar cell using ...
You’ll learn why Asyncio offers a safer alternative to preemptive multitasking (threading) and how this API provides a simple way to support thousands of simultaneous socket connections. Get a ...