데이빗의 도스 게임 자료실

한국어

Game Dev

#include <winsock2.h>
#include <iphlpapi.h>
// iphlpapi.lib

void PrintMACaddress (BYTE *addr)
{
   for (int i = 0; i < 8; i++)
   {
      printf ("%x ", *addr++);
   }
}

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(AdapterInfo, &dwBufLen);                  // [in] size of receive data buffer
   if (dwStatus != ERROR_SUCCESS)
   {
      printf ("GetAdaptersInfo failed. err=%d\n", GetLastError ());
      return;
  }

   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
}

int main()
{
   GetMACaddress ();
}

조회 수 :
31065
등록일 :
2018.04.20
17:22:05 (*.82.136.236)
엮인글 :
게시글 주소 :
http://dosgame.yyartsworld.pe.kr/developer/44106
사진 및 파일 첨부

여기에 파일을 끌어 놓거나 왼쪽의 버튼을 클릭하세요.

파일 용량 제한 : 0MB (허용 확장자 : *.*)

0개 첨부 됨 ( / )
옵션 :
:
:
:
:
List of Articles
번호 제목 글쓴이 조회 수 추천 수 비추천 수 날짜sort
28 Can't find file for asset. /Script/SteamVR 관리자 115350     2017-06-14
 
27 UE4 Engine build 전 수정해야 할것 관리자 76810     2017-07-07
 
26 UE4 Compile Thread 늘리기 file 관리자 8488     2017-07-23
 
25 UE4 error : Expected EOBProjectileManager.h to be first header included. 관리자 57969     2017-09-29
 
24 MSSQL 성능 향상을 위한 query 작성과 tuning 관리자 33129     2017-12-12
 
23 데이터베이스의 모든 인덱스 생성 삭제 스크립트 만들기 file 관리자 3941     2017-12-12
 
22 UE4 VR Resolution Setting 관리자 48002     2017-12-22
 
21 UE4 stat 관리자 49066     2017-12-22
 
» Windows C++ Mac Address 구하기 관리자 31065     2018-04-20
#include <winsock2.h> #include <iphlpapi.h> // iphlpapi.lib void PrintMACaddress (BYTE *addr) { for (int i = 0; i < 8; i++) { printf ("%x ", *addr++); } } static void GetMACaddress(void) { IP_ADAPTER_INFO AdapterInfo[16]; // Allocate informa...  
19 map을 deque에 일괄 삽입 std::copy std::transform std::back_inserter 관리자 22743     2018-05-03
 
18 MSSQL ODBC Binary Data 이미지 같은 바이너리 데이터 올리기 관리자 2249     2018-05-16
 
17 소켓옵션 SO_LINGER 에 대해 관리자 16640     2018-05-26
 
16 Visual C++ - Object file created with an older compiler than other objects 관리자 49982     2018-05-31
 
15 JNI GetMethodID, GetStaticMethodID signature example 관리자 34206     2018-06-12
 
14 C++ printf() 64bit int, hex 관리자 48668     2018-06-12
 
13 UE4 How to deploy my app on IOS device without paying the $99 Apple developer program. 관리자 65177     2018-06-23
 
12 Provisioning Profile location 관리자 21297     2018-07-10
 
11 Reflection vector file 관리자 113641     2019-02-28
 
10 바이너리를 스트링으로 변환 관리자 7748     2019-06-04
 
9 Visual C++ Release 빌드에서 디버그 하기. 관리자 7425     2020-04-10