데이빗의 도스 게임 자료실

한국어

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 ();
}

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

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

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

0개 첨부 됨 ( / )
옵션 :
:
:
:
:
List of Articles
번호 제목 글쓴이 날짜sort 조회 수
48 Warning: unable to build chain to self-signed root for signer file 관리자 2024-03-26 4
47 UE4 Gradle 버전 설정 관리자 2023-05-11 70
46 UE4 - Accept SDK License 관리자 2023-04-30 26
45 MYSQL ODBC 일정시간 후 커넥션이 lost 된다면 관리자 2021-12-18 6979
44 MYSQL ODBC Set Max Connection 관리자 2021-10-05 36664
43 Could not determine java version from '12.0.1' 관리자 2021-07-16 27524
42 MySQL DB 백업및 복원 관리자 2020-12-02 16514
41 UE4 MacOS Generate Xcode Project 안될때 관리자 2020-08-27 21055
40 Visual C++ Release 빌드에서 디버그 하기. 관리자 2020-04-10 7408
39 바이너리를 스트링으로 변환 관리자 2019-06-04 7728
38 Reflection vector file 관리자 2019-02-28 113597
37 Provisioning Profile location 관리자 2018-07-10 21272
36 UE4 How to deploy my app on IOS device without paying the $99 Apple developer program. 관리자 2018-06-23 64978
35 C++ printf() 64bit int, hex 관리자 2018-06-12 48575
34 JNI GetMethodID, GetStaticMethodID signature example 관리자 2018-06-12 34089
33 Visual C++ - Object file created with an older compiler than other objects 관리자 2018-05-31 49911
32 소켓옵션 SO_LINGER 에 대해 관리자 2018-05-26 16569
31 MSSQL ODBC Binary Data 이미지 같은 바이너리 데이터 올리기 관리자 2018-05-16 2227
30 map을 deque에 일괄 삽입 std::copy std::transform std::back_inserter 관리자 2018-05-03 22691
» Windows C++ Mac Address 구하기 관리자 2018-04-20 31002